Since Ubuntu 10.04 the OpenJDK is the recommended default JDK and the Sun JDK has been removed from the multiverse repository. From the release notes:
Sun Java moved to the Partner repository
For Ubuntu 10.04 LTS, the sun-java6 packages have been dropped from the Multiverse section of the Ubuntu archive. It is recommended that you use openjdk-6 instead.
If you cannot or do not want to use the OpenJDK implementation follow the steps below to install the sun-java6-jdk package:
# sudo aptitude install python-software-properties
# sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
# sudo aptitude update
# sudo aptitude install sun-java6-jdk
After the installation you can run
# sudo update-alternatives --config java
to choose the Java implementation the system should use if you have more than one alternative installed.