Simply relink "CurrentJDK" in /System/Library/Frameworks/JavaVM.framework/Versions to whatever version you need. Do not touch all the rest, /Library/Java/home will be properly linked automatically.
You can do this in the Terminal using
sudo rm -f CurrentJDK && sudo ln -s 1.5.0 CurrentJDK
Regards,
Christian
You can do this in the Terminal using
sudo rm -f CurrentJDK && sudo ln -s 1.5.0 CurrentJDK
Regards,
Christian