I didn’t find any clear instructions on upgrading the JDK on OS X so I thought I’d share my findings.
First off, apparently Software Update does not automatically update the JDK. You have to manually download and run the updates. There are four updates to “Java for Mac OS X 1.5″. Since I couldn’t tell whether they were cumulative or not, I just downloaded and installed each one in sequence:
Now you’d think you’d be done, but those updates only install JDK 1.6—they don’t make it the default. The way I did that was to change a link in the Framework:
cd /System/Library/Frameworks/JavaVM.framework/Versions sudo rm -fr CurrentJDK sudo ln -s 1.6 CurrentJDK
Now I see:
$ java -version java version "1.6.0_13" Java(TM) SE Runtime Environment (build 1.6.0_13-b03-211) Java HotSpot(TM) 64-Bit Server VM (build 11.3-b02-83, mixed mode)