Drawing Hands by M.C. Escher (1948)

Jeff Mesnil


Using Java 1.5 on Mac OS X Tiger

On May 2nd, 2005 in apple, java, macosx

Since I upgraded to Mac OS X Tiger, I also installed Java 1.5 on my PowerBook.

Apple provides a small application to change the default JVM to 1.5 instead of the standard 1.4.2. However it is only useful for Applets and WebStart applications. To change the default JVM for the CLI and Java applications such as Eclipse, I also had to change a symlink.


$ cd /System/Library/Frameworks/JavaVM.framework/Versions
$ sudo mv Current Current.old
$ sudo ln -s 1.5 Current

Et voila!


$ java -version
java version "1.5.0_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_02-56)
Java HotSpot(TM) Client VM (build 1.5.0_02-36, mixed mode, sharing)

7 Responses to “Using Java 1.5 on Mac OS X Tiger”

  1. Tomas Says:

    I think it’s supposed to be ‘CurrentJDK’ instead of just ‘Current’.

    $ cd /System/Library/Frameworks/JavaVM.framework/Versions $ sudo mv CurrentJDK CurrentJDK.old $ sudo ln -s 1.5 CurrentJDK

  2. Raj Says:

    Neither one of these seems to work, at least according to the information shown when you select ‘About Eclipse Platform’ from the ‘Eclipse Menu’, click on ‘Configuration Details’, scroll down a page, and look at java.home, java.runtime.version, etc.

  3. Alf Says:

    Well, I changed both of those and from ‘Configuration Details’ I got 1.5 running Eclipse. Maybe you also need to change the prefs. from “/Applications/Utilities/Java/J2SE 5.0″. I changed them first but Eclipse was still using 1.4.2 until I changed the “Current” and “CurrentJDK” to point to 1.5.0. Oh, and don’t forget to add the 1.5.0 JVM to Eclipse in the Preferences-Java (also 5.0 in the Compiler section there!).

    Hope that helps…

  4. Brent Says:

    Just changing the Current and CurrentJDK symlinks and nothing else worked just fine for me.

    You might want to check all the symlinks in JavaVM.Framework to make sure they all use Versions/Current and Versions/CurrentJDK.

  5. Raj Says:

    Now things look right. Seems like I required a reboot for the changes to take effect. Now on to another Java program I use, OxygenXML, which is still finding v 1.4.2 somehow.

  6. MJ Says:

    I changed both the Current and CurrentJDK and everything works fine when using jGRASP…except for the fact that the program for some reason is just giving me a constant busy wheel and the only way to shut it down is by forcing it. Any ideas why this is happening?

  7. Frig Says:

    If you want to use it as defualt JRE you just have to open Java Preferences (Applications/Utilities/Java/J2SE 5.0 normally) and change the “Java Application Runtime Settings” that your mac uses JRE 5.0 as default.