I fixed this with a 2-step solution:
* 1. Set JAVA_HOME correctly: *
Find out the location of the Java JDK:
/usr/libexec/java_home
Create a ~ / .bash_profile file if necessary:
touch ~/.bash_profile
Edit the .bash_profile file with TextEdit and add the following lines (change the paths if necessary):
export JAVA_HOME = / Library / Java / JavaVirtualMachines / jdk1.7.0_51.jdk / Contents / Home / export PATH = $ JAVA_HOME / bin: $ PATH
2. Set an alias to execute:
At the eclipse installation location, run:
chmod +x ./eclipse
Now, to activate Eclipse, open Finder, go to the eclipse installation directory and double-click the alias file (named eclipse, but without the eclipse icon).
source share