Installing Java 1.5 aka 5.0 in Debian Linux

I found this page and this page useful in installing Java 1.5 in Debian Linux. I had Blackdown Java 1.4.2 installed already, but wanted to keep that installation. So I had to change the links in /etc/alternatives using the update-alternatives command. I wrote a quick script to go through all the Java-related links:
#!/bin/sh
update-alternatives --config java
update-alternatives --config javac
update-alternatives --config ControlPanel
update-alternatives --config HtmlConverter
update-alternatives --config appletviewer
update-alternatives --config extcheck
update-alternatives --config idlj
update-alternatives --config jar
update-alternatives --config jarsigner
update-alternatives --config javadoc
update-alternatives --config javah
update-alternatives --config javap
update-alternatives --config javaws
update-alternatives --config jdb
update-alternatives --config keytool
update-alternatives --config policytool
update-alternatives --config rmic
update-alternatives --config rmid
update-alternatives --config rmiregistry
update-alternatives --config serialver
update-alternatives --config libjavaplugin_oji.so

Many of these did not switch to Java 1.5 because it said there was only one version available (the 1.4.2 version). The only one that didn't switch that I really cared about was the browser plugin, so I wrote this script to switch those:
#!/bin/sh
PLUGIN=/usr/lib/j2sdk1.5-sun/jre/plugin/i386/ns7/libjavaplugin_oji.so
rm /etc/alternatives/libjavaplugin_oji.so
ln -s ${PLUGIN} /etc/alternatives/libjavaplugin_oji.so
rm /etc/alternatives/libjavaplugin_oji_mozilla_firefox.so
ln -s ${PLUGIN} /etc/alternatives/libjavaplugin_oji_mozilla_firefox.so
rm /etc/alternatives/libjavaplugin_oji_mozilla_snapshot.so
ln -s ${PLUGIN} /etc/alternatives/libjavaplugin_oji_mozilla_snapshot.so