Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8024281 Mac OS X: stop relying on Apple's JavaVM Frameworks
  3. JDK-7131356

(props) "No Java runtime present, requesting install" when creating VM from JNI [macosx]

    Details

    • Subcomponent:
    • Resolved In Build:
      b125
    • CPU:
      generic
    • OS:
      os_x

      Backports

        Description

        On some Mac OS machines, if one tries to create Java VM from native executable using JNI, they will get "No Java runtime present, requesting install." message and the program will simply exit. In graphical session, there will be a popup "To open JavaApplication, you need a Java runtime. Would you like to install one now?" "Not now" "Install". DYLD_LIBRARY_PATH is set correctly.

        It seems to depend on whether default Mac OS Java is installed or not (running /usr/bin/java will get same message and popup). I suspect that accepting and installing system Java would fix the issue.

        This is a problem: starting Java VM using another location (even from JNI) should not depend on system Java.
        1. languagelist.c
          2 kB
          Brent Christian
        2. LocaleTest.java
          2 kB
          Brent Christian
        3. patch.diff
          8 kB
          Gerard Ziemski

          Issue Links

            Activity

            Hide
            bchristi Brent Christian added a comment -
            Attached the code I uses to test locales.
            Also attached some basic C code to list the Preferred Languages (to list all available languages, one should add them to the "Preferred languages" list in the Language & Region system preference).
            Show
            bchristi Brent Christian added a comment - Attached the code I uses to test locales. Also attached some basic C code to list the Preferred Languages (to list all available languages, one should add them to the "Preferred languages" list in the Language & Region system preference).
            Hide
            bchristi Brent Christian added a comment -
            noreg-other: The primary issue of this bug, the failure to start up the VM from JNI in the absence of the default Mac Java, can be tested by re-enabling existing VM tests.

            noreg-hard: The Locale-related changes would be difficult to regtest, as they would require test machines to be setup set to particular languages.
            Show
            bchristi Brent Christian added a comment - noreg-other: The primary issue of this bug, the failure to start up the VM from JNI in the absence of the default Mac Java, can be tested by re-enabling existing VM tests. noreg-hard: The Locale-related changes would be difficult to regtest, as they would require test machines to be setup set to particular languages.
            Hide
            hgupdate HG Updates added a comment -
            URL: http://hg.openjdk.java.net/jdk9/dev/jdk/rev/b88aa53f3dc6
            User: bchristi
            Date: 2016-06-23 21:14:51 +0000
            Show
            hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/dev/jdk/rev/b88aa53f3dc6 User: bchristi Date: 2016-06-23 21:14:51 +0000
            Hide
            dholmes David Holmes added a comment -
            This change has broken the os.version property - see JDK-8160370
            Show
            dholmes David Holmes added a comment - This change has broken the os.version property - see JDK-8160370
            Hide
            hgupdate HG Updates added a comment -
            URL: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/b88aa53f3dc6
            User: lana
            Date: 2016-06-29 21:04:34 +0000
            Show
            hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/b88aa53f3dc6 User: lana Date: 2016-06-29 21:04:34 +0000

              People

              • Assignee:
                bchristi Brent Christian
                Reporter:
                bchristi Brent Christian
              • Votes:
                1 Vote for this issue
                Watchers:
                15 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: