The OpenJ9 JVM fails to start, with IBM Java 8 or any version of IBM Semeru, if the classpath is set to the same string value as the main class name.
For example:
$ java -cp Main Main
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
It doesn't matter whether the classpath is set on the command line as above, or via the CLASSPATH environment variable.
Using -verbose:init and _JAVA_LAUNCHER_DEBUG=true I narrowed the failure down to somewhere in JNI_CreateJavaVM() before this line:
|
|| (0 != addLauncherArgs(&j9portLibrary, args, launcherArgumentsSize, &vmArgumentsList, |
(The debug string "Adding command line arguments" does not get printed in the failing scenario.)
Other JVM implementations (e.g. Hotspot) do not exhibit this issue.
The OpenJ9 JVM fails to start, with IBM Java 8 or any version of IBM Semeru, if the classpath is set to the same string value as the main class name.
For example:
It doesn't matter whether the classpath is set on the command line as above, or via the
CLASSPATHenvironment variable.Using
-verbose:initand_JAVA_LAUNCHER_DEBUG=trueI narrowed the failure down to somewhere inJNI_CreateJavaVM()before this line:openj9/runtime/j9vm/jvm.c
Line 2228 in 7dece2b
(The debug string "Adding command line arguments" does not get printed in the failing scenario.)
Other JVM implementations (e.g. Hotspot) do not exhibit this issue.