You need to enable the partner source (assuming you're using Lucid):
sudo add-apt-repository “deb http://archive.canonical.com/ lucid partner”
Update, and then install the necessary packages:
sudo apt-get update sudo apt-get install sun-java6-jre sun-java6-jdk sun-java6-plugin sun-java6-fonts