Since Ubuntu 9.10 (Karmic Koala), Canonical has dropped support of Sun Java on Ubuntu. However, I noticed that Canonical has slowly reintroduced Sun Java to Ubuntu by placing the .deb installers into the Ubuntu 'partner' repository. To install, type in the following:
sudo add-apt-repository “deb http://archive.canonical.com/ lucid partner”
This will add the associated Ubuntu repository to your Ubuntu. Next, you'll want to install Java 6 Update 20, this can be done by:
sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts
You will now have a proper version of Java in your Ubuntu setup.