Java Application not running on OS X Yosemite

流过昼夜 提交于 2019-12-11 08:10:16

问题


After installing OS X Yosemite, one of my Java Applications stopped running. The message was that I needed JAVA SE 6 Runtime. Exactly as in Eclipse Kepler for OS X Mavericks request Java SE 6

I did as user Nikolas suggested and apparently had the same problem as user Sage commented:

Initially, this gave me the Eclipse error Failed to create the Java Virtual Machine, but that was because my /usr/bin/java was symlinked to another 1.7 (the /Library/Internet/... plugins one instead of the /Library/Java... one). After fixing that link, this works beautifully for me - I wish I could give two upvotes! – sage Dec 28 '13 at 0:43 "

This is what Terminal says after trying to run it:

JavaVM: Failed to load JVM: /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/bundle/Libraries/libserver.dylib
JavaVM: Failed to load JVM: /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/bundle/Libraries/libserver.dylib
JavaVM FATAL: Failed to load the jvm library.
[JavaAppLauncher Error] JNI_CreateJavaVM() failed, error: -1
logout

[Process completed]

Anyone can advice me on how to go around this issue?


回答1:


As per here, there's an update for El Capitan. The updated solution, that worked here, would be:

$ sudo mkdir -p /Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home/bundle/Libraries
Password:
$ sudo ln -s /Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home/jre/lib/server/libjvm.dylib /Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home/bundle/Libraries/libserver.dylib



回答2:


You can solve the problem creating links as seen here http://oliverdowling.com.au/2014/03/28/java-se-8-on-mac-os-x/



来源:https://stackoverflow.com/questions/26597756/java-application-not-running-on-os-x-yosemite

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!