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

Call to JNI_CreateJavaVM requires installation of Java SE 6

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 8u25
    • Fix Version/s: None
    • Component/s: hotspot
    • Subcomponent:
    • CPU:
      x86
    • OS:
      os_x

      Description

      FULL PRODUCT VERSION :
      java version "1.8.0_25"
      Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
      Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)

      FULL OS VERSION :
      Darwin xx-Mac.local 14.0.0 Darwin Kernel Version 14.0.0: Sat May 24 01:15:10 PDT 2014; root:xnu-2738.0.0.0.5~1/RELEASE_X86_64 x86_64

      A DESCRIPTION OF THE PROBLEM :
      Loading the libjvm.dylib library and calling function JNI_CreateJavaVM spawn install Java SE 6 dialog box.



      THE PROBLEM WAS REPRODUCIBLE WITH -Xint FLAG: Did not try

      THE PROBLEM WAS REPRODUCIBLE WITH -server FLAG: Yes

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Load JNI library.
      Invoke JNI_CreateJavaVM function.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      Expected is to load JVM.

      Actually displays dialog requesting to install Java SE 6, prints message
      "No Java runtime present, requesting install." and exits.



      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      void *jvmLibrary = dlopen("/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/server/libjvm.dylib", RTLD_LAZY|RTLD_GLOBAL);

      jint (JNICALL *CreateJVM_Method)(JavaVM **pvm, void **penv, void *args);
      CreateJVM_Method = dlsym(jvmLibrary, "JNI_CreateJavaVM");

      void *arg = ...;
      JavaVM* vm = NULL;
      void* env;
      CreateJVM_Method(&vm, &env, arg);
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      JNI should be added to Info.plist.

      Similar problems were rejected in following bug report:
      https://bugs.openjdk.java.net/browse/JDK-8042674

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: