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

后端 未结 7 2017
自闭症患者
自闭症患者 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:14

    I've fixed this using a 2 step solution:

    *1. Set JAVA_HOME correctly:*

    Find out the Java JDK location:

    /usr/libexec/java_home
    

    Create the ~/.bash_profile if needed:

    touch ~/.bash_profile
    

    Edit the .bash_profile file using TextEdit, and add the following lines (change the paths as necessary):

    export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home/ export PATH=$JAVA_HOME/bin:$PATH

    2. Set the alias to be executable:

    From the eclipse install location, run:

    chmod +x ./eclipse
    

    Now to activate Eclipse I open Finder, navigate the to eclipse installation directory and double click the alias file (named eclipse, but without the eclipse icon).

提交回复
热议问题