Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8211959

JLI_Launch unable to launch a JVM on Mac following the fix for JDK-8210931

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P2 P2
    • 12
    • 12
    • tools
    • b13
    • 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);

            henryjen Henry Jen
            kcr Kevin Rushforth
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: