Im on 10.5 and as part of installing some software I switched my Java version by changing the symbolic link /System/Library/Frameworks/JavaVM.framework/Versions/Current so it pointed to 1.6 instead of 1.5. This broke some other software I need for my day-to-day work so I tried to switch back to 1.5 but it didn't work. Now Java is broken on my machine:
# java -version
Failed to open library /System/Library/Frameworks/JavaVM.framework/JavaVM
Failed to find scheduleUpdateSharing in JavaVM library: invalid handle passed to dlsym()
Bus error
Then, reverse the steps you used to do the original switch. I realize you're running Leopard, but those were the only posts I could cite that mentions reverting.
The first thing I tried was reversing those steps and then the next thing I tried was Googling. In other words, I only posted here when I had exhausted the obvious options. I was hoping someone from Apple that was more knowledgeable about the Java runtime on Mac OS X would have some more insight.
I downloaded and (re)installed the last 10.5 Java update by removing the old 1.5 folder and copying this new tree into place and replacing the sym link. Now at least I can run java -version and get the proper response:
$ java -version
java version "1.5.0_19"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_19-b02-304)
Java HotSpot(TM) Client VM (build 1.5.0_19-137, mixed mode, sharing)
(previously I was getting a bus error).
I still can't run any Java applications (like Cyberduck or Eclipse) so Im still dead in the water as far as apps go.