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

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P2
    • Resolution: Duplicate
    • Affects Version/s: 12
    • Fix Version/s: 12
    • Component/s: tools
    • Labels:
    • Subcomponent:
    • Introduced In Build:
      b13
    • Introduced In Version:
      12

      Description

      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);

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: