Running Java 1.5 on Mac OS X Tiger

As it turns out you can pretty easily download the new 1.5 JDK, but there are a few wrinkles. It doesn’t become your default JDK unless you do some tweaking. In my case this involved IntelliJ as well.

The first step involves downloading the 1.5 JDK from apple.

I then assumed running

java -version

would show me the new 1.5 version. Instead I got:

>java -version
java version '1.4.2_07'

Next step is to change the default JDK:

>cd /System/Library/Frameworks/JavaVM.framework/Versions 
>sudo rm CurrentJDK 
>sudo ln -s 1.5.0 CurrentJDK 

Now when I run

java -version

I get the expected:

>java -version
java version '1.5.0_02'

After that I had to download IntelliJ IDEA 5 from, because as it turns out the Mac OS X version of 4.5 didn’t support the 1.5 JDK. Makes sense since Apple didn’t release 1.5 until just recently so they couldn’t have built 4.5 to support it. Anyway it’s a bit beta software so far, but it does let force me to realize the new 1.5 context, which is part of the point. Now I’m up and running.