MacOSX Snow Leopard and Eclipse: Error starting Eclipse (No Java virtual machine…)

后端 未结 7 2019
自闭症患者
自闭症患者 2020-12-18 05:46

This is so frustrating.

I did no update of java nor eclipse and suddenly I can\'t open eclipse. I even didn\'t install any other programs. Here is the error:

相关标签:
7条回答
  • 2020-12-18 06:19

    You need to create a file ~/.MacOSX/environment.plist and add JAVA_HOME => /Library/Java/Home entry into it. If you have XCode installed, use it to add entry. Otherwise, use plain text editor:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
        <key>JAVA_HOME</key>
        <string>/Library/Java/Home</string>
    </dict>
    </plist>
    

    After that, restart MaxOS or logout/login.

    See http://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPRuntimeConfig/Articles/EnvironmentVars.html for details.

    Cheers, Max

    0 讨论(0)
提交回复
热议问题