-
Bug
-
Resolution: Fixed
-
P2
-
12
ADDITIONAL SYSTEM INFORMATION :
OS: MacOS Sierra 10.12.6 (16G1618)
-------------------------
Java:
openjdk version "12-ea" 2019-03-19
OpenJDK Runtime Environment (build 12-ea+17)
OpenJDK 64-Bit Server VM (build 12-ea+17, mixed mode, sharing)
A DESCRIPTION OF THE PROBLEM :
With the https://bugs.openjdk.java.net/browse/JDK-8210931 libjli has moved from "jli" subdirectory into standard lib directory.
However `GetJREPath` method in `src/java.base/macosx/native/libjli/java_md_macosx.m` still assumes that `libjli.dylib` should be on `lib/jli/libjli.dylib` path.
The fix is simplly to remove `/jli` from the lastPathComponent like patch below shows:
--- a/src/java.base/macosx/native/libjli/java_md_macosx.m Fri Nov 02 19:38:54 2018 +0100
+++ b/src/java.base/macosx/native/libjli/java_md_macosx.m Sun Nov 04 16:36:19 2018 +0100
@@ -508,7 +508,7 @@
return JNI_FALSE;
}
- const char lastPathComponent[] = "/lib/jli/libjli.dylib";
+ const char lastPathComponent[] = "/lib/libjli.dylib";
size_t sizeOfLastPathComponent = sizeof(lastPathComponent) - 1;
if (pathLen < sizeOfLastPathComponent) {
return JNI_FALSE;
REGRESSION : Last worked in version 11.0.1
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run application which uses `JNI_CreateJavaVM` to create a JVM (like Eclipse 4.9/4.10 does).
Download Eclipse application, run Eclipse with `-vm` parameter pointing to the openJDK 12 build as shown below:
$ ~/Workspace/test/Eclipse.app/Contents/MacOS/eclipse -vm ~/Workspace/test/jdk-12.jdk/Contents/Home/bin/java
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Eclipse application starts.
ACTUAL -
Eclipse fails to start with "Failed to create the Java Virtual Machine." error dialog. In console "Failed to GetJREPath()" is printed:
$ ~/Workspace/test/Eclipse.app/Contents/MacOS/eclipse -vm ~/Workspace/test/jdk-12.jdk/Contents/Home/bin/java
CONSOLE OUT:
Error: could not find libjava.dylib
Failed to GetJREPath()
FREQUENCY : always
OS: MacOS Sierra 10.12.6 (16G1618)
-------------------------
Java:
openjdk version "12-ea" 2019-03-19
OpenJDK Runtime Environment (build 12-ea+17)
OpenJDK 64-Bit Server VM (build 12-ea+17, mixed mode, sharing)
A DESCRIPTION OF THE PROBLEM :
With the https://bugs.openjdk.java.net/browse/JDK-8210931 libjli has moved from "jli" subdirectory into standard lib directory.
However `GetJREPath` method in `src/java.base/macosx/native/libjli/java_md_macosx.m` still assumes that `libjli.dylib` should be on `lib/jli/libjli.dylib` path.
The fix is simplly to remove `/jli` from the lastPathComponent like patch below shows:
--- a/src/java.base/macosx/native/libjli/java_md_macosx.m Fri Nov 02 19:38:54 2018 +0100
+++ b/src/java.base/macosx/native/libjli/java_md_macosx.m Sun Nov 04 16:36:19 2018 +0100
@@ -508,7 +508,7 @@
return JNI_FALSE;
}
- const char lastPathComponent[] = "/lib/jli/libjli.dylib";
+ const char lastPathComponent[] = "/lib/libjli.dylib";
size_t sizeOfLastPathComponent = sizeof(lastPathComponent) - 1;
if (pathLen < sizeOfLastPathComponent) {
return JNI_FALSE;
REGRESSION : Last worked in version 11.0.1
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run application which uses `JNI_CreateJavaVM` to create a JVM (like Eclipse 4.9/4.10 does).
Download Eclipse application, run Eclipse with `-vm` parameter pointing to the openJDK 12 build as shown below:
$ ~/Workspace/test/Eclipse.app/Contents/MacOS/eclipse -vm ~/Workspace/test/jdk-12.jdk/Contents/Home/bin/java
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Eclipse application starts.
ACTUAL -
Eclipse fails to start with "Failed to create the Java Virtual Machine." error dialog. In console "Failed to GetJREPath()" is printed:
$ ~/Workspace/test/Eclipse.app/Contents/MacOS/eclipse -vm ~/Workspace/test/jdk-12.jdk/Contents/Home/bin/java
CONSOLE OUT:
Error: could not find libjava.dylib
Failed to GetJREPath()
FREQUENCY : always
- duplicates
-
JDK-8211959 JLI_Launch unable to launch a JVM on Mac following the fix for JDK-8210931
- Closed
- relates to
-
JDK-8215000 tools/launcher/JliLaunchTest.java fails on Windows
- Resolved
-
JDK-8210931 JLI and launchers normalization and cleanup
- Resolved