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.🙂

Picture: Eclipse by A4size-ska

About philastokes

Freelance Writer, Developer and Technical Communicator. Explaining the unexplainable with images, video and text. Scripting anything imaginable in Applescript, Bash, C, Objective C, Cocoa, Python and Xcode.

Posted on May 18, 2015, in Developer, Java and tagged , , , . Bookmark the permalink. 2 Comments.

  1. I don’t understand the need to remove Jave SE 6 components before installing Oracle’s Java SE 8. Many of us have had both installed without issue ever since Oracle took responsibility for OS X Java. Is there something unique to Eclipse IDE that requires Apple Java removal?

    • Eclipse will call the system’s default Java installation. If that happens to be Apple’s 1.6, then simply installing Oracle’s 1.8 won’t do you any good.

      You can muck about in Eclipse’s info.plist and edit that to tell it specifically which JDK you want it to use if you’re determined to keep both. However, I don’t really see any purpose in keeping Apple’s legacy installation. It’s not even part of the default OS X installation itself, and even Apple says if you need Java you should get it from Oracle.

%d bloggers like this: