简体   繁体   English

带有jdk 1.7的10.9上的JNI_CreateJavaVM显示了在Mac上安装JAVA SE 6的弹出对话框

[英]JNI_CreateJavaVM on 10.9 with jdk 1.7 is showing the popup dialog to install JAVA SE 6 on Mac

I have read through StackOverflow for the answer for this query of mine but have some doubts still. 我已经阅读了StackOverflow作为我这个查询的答案,但是仍然有一些疑问。 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? 要使用jdk 1.7,是使用JNI,BundledApp作为JVMCapabilities更新Info.plist的唯一解决方案,还是还有其他方法可以调用JNI_CreateJavaVM调用? 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); 我打算使用/ usr / libexec / java_home找出jdk的当前版本,并使用dlopen和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. 如果/Library/Java/JavaVirtualMachines/jdk1.7.0_65.jdk//Contents/下的Info.plist不包含值为JNI,BundledApp的JVMCapabilities部分,则会提示您从Apple安装Java SE 6。 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. 我不能要求应用程序的用户手动编辑Info.plist。 What is the solution to get this to use the jdk 1.7? 使用jdk 1.7的解决方案是什么?

This looks a lot like a bug that should be fixed by Oracle. 这看起来很像应该由Oracle修复的错误。 There have been a lot of screw-ups like this in the 1.6 to 1.7 hand-off from Apple to OpenJDK. 从Apple到OpenJDK的1.6到1.7交接中有很多类似的问题。 I was unable to find a workaround other than modifying the plist directly. 除了直接修改plist之外,我找不到其他解决方法。 So file a bug report upstream and wait for Oracle or the OpenJDK team to fix the issue. 因此,向上游提交错误报告,然后等待Oracle或OpenJDK团队解决此问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM