- 
    Bug 
- 
    Resolution: Duplicate
- 
     P2 P2
- 
    12
                    We are unable to use JLI_Launch to launch a JVM on Mac following the fix for JDK-8210931. This is causing an application launcher created by jpackager, which is under development in the 'JDK-8200758-branch' branch of the jdk/sandbox repo, to fail to launch with the following error:
Error: could not find libjava.dylib
Error: Could not find Java SE Runtime Environment.
This is due to the following, which should have been changed at the same time:
src/java.base/macosx/native/libjli/java_md_macosx.m: const char lastPathComponent[] = "/lib/jli/libjli.dylib";
I grepped the sources and found the following which also should be examined:
src/java.base/unix/native/libjli/java_md_solinux.c: JLI_StrLen(jrepath) + JLI_StrLen("/lib//jli:") +
src/java.base/unix/native/libjli/java_md_solinux.c: "%s/lib/jli:" /* Needed on AIX because ld doesn't support $ORIGIN. */
test/hotspot/gtest/gtestMain.cpp: size_t len = strlen(java_home) + strlen("/lib/jli/libjli.dylib") + 1;
test/hotspot/gtest/gtestMain.cpp: snprintf(path, len, "%s/lib/jli/libjli.dylib", java_home);
            
Error: could not find libjava.dylib
Error: Could not find Java SE Runtime Environment.
This is due to the following, which should have been changed at the same time:
src/java.base/macosx/native/libjli/java_md_macosx.m: const char lastPathComponent[] = "/lib/jli/libjli.dylib";
I grepped the sources and found the following which also should be examined:
src/java.base/unix/native/libjli/java_md_solinux.c: JLI_StrLen(jrepath) + JLI_StrLen("/lib//jli:") +
src/java.base/unix/native/libjli/java_md_solinux.c: "%s/lib/jli:" /* Needed on AIX because ld doesn't support $ORIGIN. */
test/hotspot/gtest/gtestMain.cpp: size_t len = strlen(java_home) + strlen("/lib/jli/libjli.dylib") + 1;
test/hotspot/gtest/gtestMain.cpp: snprintf(path, len, "%s/lib/jli/libjli.dylib", java_home);
- duplicates
- 
                    JDK-8213362 [macOS] Could not find libjava.dylib error when initializing JVM via JNI_CreateJavaVM -           
- Closed
 
-         
- relates to
- 
                    JDK-8211288 app-image fails to find JLI lib at launch time -           
- Resolved
 
-