To install Oracle (Sun) JDK, do one of the following Use the Debian repository.
In the Command prompt, type the following sequence of commands:
1、sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
2、sudo apt-get update sudo apt-get install sun-java6-jdk sun-java6-jre sun-java6-plugin
3、java -version #to check that installation is successful.