Monday, July 28, 2008

Getting Eclipse to Run on Leopard (with Java6)

Over the weekend, I finally upgraded to Leopard. The upgrade experience was very good; it sucked my backup files (that I had created using SuperDuper) from my attached USB drive and created all the appropriate accounts. WIN! Apart from the impression that since the upgrade I am seeing greater memory consumption than what I saw with Tiger, the Leopard experience has been pleasant. Java 6 installed itself sometime after the upgrade, but it wasn't made the default JDK. Setting that was as easy as creating a symlink:

/System/Library/Frameworks/JavaVM.framework/Versions> ln -s 1.6 CurrentJDK

However, Eclipse wouldn't launch after making this change.

Eclipse
Uploaded with plasq's Skitch!

With Dean Wette's help, I was able to sort this out. I edited:

[eclipse_home]/Eclipse.app/Contents/MacOS/eclipse.ini

And added:

-vm
/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/bin/java

Launching Eclipse now uses the 1.5 version of the Java executable, and everything works. While I was trying the above, I had it as '-vm=/System...', but this did not work. For some reason, the newline between -vm and the path was important.

No comments: