Back up Java 5 on Leopard Prior to Snow Leopard Upgrade

Posted by: on Aug 29, 2009 | No Comments

One of my biggest concerns about Snow Leopard is that Java 5 would not be included. Reports from the Apple’s java-dev mailing list today confirm this. While most apps should work with Java 6 by now, there will always be a few stragglers.

tar -czvf Java15Leopard.tar.gz -C \
>/System/Library/Frameworks/JavaVM.framework/Versions/ 1.5.0

Now, put this file in a safe place and back it up before you upgrade. Once you have upgraded if you have an app that just won’t work on Java 1.6 then you can perform the following steps to hack in Java 1.5 on Snow Leopard.

Extract the file:

tar -xzvf Java15Leopard.tar.gz

Move it to your Java Frameworks folder.

sudo mv 1.5.0 \
>/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0-leopard

Recreate the symbolic link:

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

Now open Java Preferences.app and change the “J2SE 5.0 32-bit” to be the default Java Virtual Machine for the “Java Applications” section at the bottom of the screen. Alternatively, you can just change whatever app that needs Java 5 to point to /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0.

There you go, party like it’s 2004!

Leave a Reply