Wednesday, March 16, 2011

Recovering Lost Java 1.5.0 for Snow Leopard After Java for Mac OS X 10.6 Update 4 Install

It looks like Java for Mac OS X 10.6 Update 4 just deleted my /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0-leopard directory that I had setup. It is as if Apple assumes that it is ok to delete whatever the /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0 or /System/Library/Frameworks/JavaVM.framework/Versions/1.5 symlinks were pointed to.

To get them back:

sudo port install wget
cd /tmp/
tar -zxvf java.1.5.0-leopard.tar.gz
sudo mv 1.5.0 /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0-leopard
cd /System/Library/Frameworks/JavaVM.framework/Versions/
sudo rm 1.5.0
sudo ln -s 1.5.0-leopard 1.5.0
sudo ln -s 1.5.0-leopard 1.5
To get Java 1.4, which it doesn't mess with, but just for completeness:
cd /tmp/
tar -zxvf java.1.4.2-leopard.tar.gz
sudo mv 1.4.2 /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2-leopard
cd /System/Library/Frameworks/JavaVM.framework/Versions/
sudo ln -s 1.4.2-leopard 1.4.2
sudo ln -s 1.4.2-leopard 1.4
This information was originally posted and the binaries hosted by Ted Wise as "Using Java 1.5 and Java 1.4 on Snow Leopard". Thanks again, Ted!

No comments: