Search code examples
javaeclipsejava-6

How can I get Eclipse on OSX to use Java 1.6?


I just installed Java 1.6 on my OSX and everything works brilliantly, except that Eclipse refuses to start. It puts up a huge prompt from which I can't copy/paste, but it's clearly stating that it wants to be using Java 1.5 and can't find it anymore.

I don't see anything in its configuration files about which version of Java it should be looking for. Has anyone dealt with this?

Thanks in advance.


Solution

  • on /Applications/Eclipse/Eclipse.app right click and choose "Show Package Contents" open Contents/Info.plist with a text editor NOT plist editor

    add <string>-vm</string> <string>/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Commands/java</string>

    to

    <key>Eclipse</key>
            <array>
    <!-- add it here -->
    </array>
    

    save it and restart.