Installing Sun's Java Development Kit 5.0 Update 12 on Ubuntu 7.04

I read varying ways on how to do this, but this is what worked for me, using Ubuntu 7.04, fully up-to-date, as of June 11, 2007, 7:00 PM, CST.

First, I downloaded the current version of JDK 5.0 from, for Linux (jdk-1_5_0_12-linux-i586.bin), saving it to the desktop.

I then right clicked on the bin file, and under Permissions allowed execute rights. Elsewhere I saw that this should be made into a deb file, but another said bin was fine, so ...

Once spacebar, spacebar, spacebar-ing through the agreement, I agreed and it extracted to /home/strivinglife/

In Terminal, I cd /home/strivinglife, followed by sudo mv jdk1.5.0_12 /usr/lib (which moved the entire directory).

sudo update-alternatives --install /usr/bin/java java /usr/lib/jdk1.5.0_12/bin/java 300

sudo update-alternatives --config java, and then selected the jdk I just installed.

I also did sudo ln -s /usr/lib/Java6u1/jre/plugin/i386/ns7/ /usr/lib/firefox/plugins since was bombing.