- In /System/Library/Frameworks/JavaVM.framework/Versions, symlink CurrentJDK -> 1.6. Leave Current -> A
- I also changed the location of the java binary to: /usr/bin/java -> /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Commands/java
- Right/Ctrl click on the Eclipse icon, Show Package Contents, edit the Info.plist file and uncomment the line that says: <string>-vm</string><string>/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Commands/java</string>
Now, you will have the best of both worlds as things stand today. Java 1.6 on the command line and Eclipse running under 1.5. Oh, by the way, if you haven't noticed yet, Eclipse 3.4 is out.
8 comments:
Don't change the symlinks around - it will come back to bite you. You can use the Java Preferences control panel to change the Java version for most situations, including the command line java and javac commands. For everything else just treat it like a standard UNIX system and adjust your PATH and JAVA_HOME variables.
Adjusting the symlinks has never been required on OS X and has always been strongly discouraged by Apple.
Yea, that didn't work for me.
Worked for me. Yes, messing around with the symlinks will probably bite us in the behind later, but at least it works NOW. Thanks Jon!
Excellent. This really helped me out, too. Thanks for the info.
adrian: Changing the Java version in the control panel doesn't change the CurrentJDK symlink (it does change the Current symlink, it seems).
Jon, thanks for posting this!
Thanks a lot; working and broke it by fixing something, and now I can work again! :D
It is funny, I keep coming back to this page myself every couple of months. =)
Thanks for the recipe. I just upgraded to Leopard and Java 6 and found myself without a working Eclipse. It's working now!
Post a Comment