0

I have read through StackOverflow for the answer for this query of mine but have some doubts still. To make use of the jdk 1.7, is updating the Info.plist with JNI, BundledApp as JVMCapabilities the only solution or is there any other way to invoke the JNI_CreateJavaVM call? I'm planning to use /usr/libexec/java_home to figure out the current version of jdk and use dlopen and dlsym - dlopen("/Library/Java/JavaVirtualMachines/jdk1.7.0_65.jdk//Contents/Home/jre/lib/server/libjvm.dylib", RTLD_LAZY); If the Info.plist under /Library/Java/JavaVirtualMachines/jdk1.7.0_65.jdk//Contents/ does not contain the JVMCapabilities section with values as JNI, BundledApp, I get a prompt to install Java SE 6 from Apple. If I manually edit this, I don't get this popup. I cannot ask the users of my application to manually edit the Info.plist. What is the solution to get this to use the jdk 1.7?

user932118
  • 21
  • 2
  • possible duplicate of [Eclipse Kepler for OS X Mavericks request Java SE 6](http://stackoverflow.com/questions/19563766/eclipse-kepler-for-os-x-mavericks-request-java-se-6) – Alex Barker Jul 30 '14 at 18:24
  • http://stackoverflow.com/questions/35187227/using-oracle-java-vm-in-process-on-mac/35207921#35207921 – Seva Alekseyev Feb 17 '16 at 17:23

1 Answers1

0

This looks a lot like a bug that should be fixed by Oracle. There have been a lot of screw-ups like this in the 1.6 to 1.7 hand-off from Apple to OpenJDK. I was unable to find a workaround other than modifying the plist directly. So file a bug report upstream and wait for Oracle or the OpenJDK team to fix the issue.

Alex Barker
  • 4,316
  • 4
  • 28
  • 47