Java Woes on Snow Leopard (10.6)

Correction: I just discovered that this is not a J2SE 6.0 issue but rather a 64-bit issue. The 64-bit version of the J2SE doesn't play nice with Aventail Connection. Simple updating your preferences to put J2SE 6.0 (32-bit) ahead of the 64-bit version works and you don't have to do all of this.

I just installed Mac OS 10.6, Snow Leopard, on Friday before I went on vacation and was disappointed to find that the upgraded version of java that it had installed broke my Aventail Connect VPN client. Neither the web interface nor the desktop client works under Snow leopard.

It would appear that you can run different versions of java concurrently but Snow Leopard lies marking java 1.6 as 1.5.0; looking at the confusing mess of java version symlinks it's no wonder things don't work:

/images/blog_pics/java_versions.png

It turns out the fix for this is pretty simple, just downgrade java versions. To do that you'll need to grab a version from 10.5 Leopard. There's a version posted at the University of Washington and I'll mirror a copy when I get a chance. Download this and untar it. Here's the complete set of steps:

cd /tmp/
wget http://www.cs.washington.edu/homes/isdal/snow_leopard_workaround/java.1.5.0-leopard.tar.gz
tar -xvzf java.1.5.0-leopard.tar.gz
su
mv 1.5.0 /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0-leopard
cd /System/Library/Frameworks/JavaVM.framework/Versions/
rm 1.5.0
ln -s 1.5.0-leopard 1.5.0

Once that's done you should now be able to mark that version of java as the preferred version. To do this you need to run the 'Java Preferences.app' which is located in /Applications/Utilities. The only required changes are to re-arrange the versions of java for both applets and applications. This is what my final configuration looks like:

/images/blog_pics/revised_java_settings.png

Now that java has been downgraded successfully you should be able to start up Aventail Connect and connect to your VPN just fine. The browser version works again too. This shouldn't affect any other java applications on your system but I haven't done any testing to verify this. In any case, once Sonicwall updates their client for Aventail you can just move the J2SE 5.0 version to the bottom of the priority list and continue working as usual.