how to get Eclipse and Java to play on Yosemite
If you’re trying to launch the Eclipse IDE with Apple’s old 1.6 JDK installed and find that you’re having trouble updating your Java installation, try the following procedure.
1. Remove Apple’s JRE
First up, let’s get rid of the end user plug in. In Terminal, do
sudo rm -rf /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
2. Remove Apple’s JDK
Next, we need to uninstall the Java Development Kit. Do not mess about in the System’s Frameworks/JavaVM.framework folders. You’ll need those. Rather, in Terminal do
sudo rm -rf /System/Library/Java/JavaVirtualMachines/1.6.0.jdk
If you’ve got later versions of the JDK (like 1.7), change the file name in the above command appropriately.
3. Install Oracle’s JDK for Mac
Next go to the Oracle Java page and look for the latest JDK. It’s important that you get the JDK for developers and NOT the JRE for end-users if you want to use Eclipse.
Download and run the installer. You should now be able to launch Eclipse without problems. 🙂