Tuesday, December 16, 2008

OS X and Java SE 6

It appears that you can run Java SE 6 on a Mac, but only if you're Intel 64-bit. No PowerPC, no 32-bit Intel.

But from my terminal on a 64-bit Intel machine with all updates:

$ type java
java is /usr/bin/java

$ java -version
java version "1.5.0_16"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b06-284)
Java HotSpot(TM) Client VM (build 1.5.0_16-133, mixed mode, sharing)

In order to get Java SE 6 running on your Mac, open the Java Preferences (at /Applications/Utilities/Java/Java Preferences) and drag Java SE 6 to the top of the list for Java applet versions and/or Java application versions. Now I get:

$ java -version
java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b06-153)
Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_07-b06-57, mixed mode)

Note that you may not be very happy with the result... Given the history of Java support on OS X, perhaps I should try SoyLatte.