I've just upgraded to Yosemite. I'm trying to run the latest version of Eclipse but I get an error saying that Eclipse cannot run on Java 6. Running
java --version on Terminal gives me Java 8. Why is Eclipse using Java 6?
Make sure you have the Java Control Panel installed (System Preferences) if not download the latest JAVA from https://www.java.com (actual exact version is JAVA 7 update 71). You may then get a working version of eclipse on : https://www.eclipse.org/downloads/ You may need to start Eclipse the first time by "right clicking" and choose "Open" (I don't think the application is signed to be acknowledge by Gatekeeper)...
I could open Eclipse after download this version of java http://support.apple.com/kb/DL1572
As it was said, sometimes upgrading from LUNA to MARS solves the problem - http://download.eclipse.org/releases/mars
You need to replace the system Java 1.6 by a downloaded 1.8.
I'm still stuck with Eclipse: "The JVM shared library ..... does not contain the JNI_CreateJavaVM symbol", but at least it's detecting the right java.