Hi Rob,
Which version of Ubuntu are you using?
If it's dapper (6.06) or above, then you are better off installing the precompiled ubuntu packages. I would recommend that you remove the JDK which you have installed and then install the ubuntu ones with:
Code:
apt-get install sun-java5-jdk
update-alternatives --config java
You will just need to accept the license during installation and that's it, you're up and running.
On the other hand you can continue to maintain your existing version, but I can't guarantee you will be able to get it to work easily. The /etc/alternatives dir is a more organized way of handling symlinks for multiple versions of one program (Sun Java, GCJ, Blackdown Java...) and linking /usr/bin/java* to appropriate binaries may cause problems with programs that depend on it (don't know of any programs at this time).
You can try the "update-alternatives" script but with parameters that point to your JDK installation.
There is of course, the fully detailed JAVA Howto for DEbian Ubuntu available
here
Hope that helps.
--LM