Error occurred during initialization of VM macosx

徘徊边缘 提交于 2019-12-13 00:55:48

问题


I see a few question with this title already. I have checked it, if it has a solution for me, but not.

I had a java 1.6 installed the 1.7 in .bash_profile I hade an export with JAVA_HOME poiting to 1.6. I have removed and I have removed all Java / sdk related stuff, and I think I have removed from osx something too, what I shouldn't :)

I have installed the 64 bit version of the 1.7.0_13, now it isn't at the bin folder in the PATH, so if I navigate there and doubleclick on Java it will have this output:

/Library/Java/JavaVirtualMachines/jdk1.7.0_13.jdk/Contents/Home/bin/java ; exit;
Error occurred during initialization of VM
java.lang.NullPointerException
    at java.util.Hashtable.put(Hashtable.java:542)
    at java.lang.System.initProperties(Native Method)
    at java.lang.System.initializeSystemClass(System.java:1115)

logout

Great, what is not finding? How to solve it? I can't launch any java based program now.

OSX version 10.8.2

No effect that button if I press it!

PS Appengine needs 1.7 to let me login from Eclipse, not enough the 1.6 otherwise is an error message with invalid request.

UPDATE based on comment:

otool -L /Library/Java/JavaVirtualMachines/jdk1.7.0_13.jdk/Contents/Home/bin/java
/Library/Java/JavaVirtualMachines/jdk1.7.0_13.jdk/Contents/Home/bin/java:
    /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 17.0.0)
    /System/Library/Frameworks/Security.framework/Versions/A/Security (compatibility version 1.0.0, current version 55110.0.0)
    /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 41.0.0)
    /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0)
    /usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)
    /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 635.19.0) 

回答1:


Put back the /System/Library/Frameworks/ entry that you have deleted :)



来源:https://stackoverflow.com/questions/14675875/error-occurred-during-initialization-of-vm-macosx

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