-
Bug
-
Resolution: Fixed
-
P3
-
9
-
b120
-
Verified
Consider the following:
$ images/jdk/bin/java -Xpatch:java.base=jdk/modules/java.base -version
Error occurred during initialization of VM
java.lang.ExceptionInInitializerError
at java.lang.module.ModuleFinder.ofSystem(java.base/ModuleFinder.java:166)
at jdk.internal.module.ModuleBootstrap.boot(java.base/ModuleBootstrap.java:105)
at java.lang.System.initPhase2(java.base/System.java:1924)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
at java.lang.module.SystemModuleFinder.<clinit>(java.base/SystemModuleFinder.java:107)
at java.lang.module.ModuleFinder.ofSystem(java.base/ModuleFinder.java:166)
at jdk.internal.module.ModuleBootstrap.boot(java.base/ModuleBootstrap.java:105)
at java.lang.System.initPhase2(java.base/System.java:1924)
The issue here is that the runtime image is an images build but the classes for java.base are loaded from the exploded build. This means that the checked-in java.lang.module.SystemModules is loaded rather then the generated classes.