If you have not already installe the official Oracle JDK on your ubuntu box, it’s a breeze to perform the following steps:

Thanks to : http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer

Very easy !

test it with a :

java -version

you must get the last version of Oracle Java JDK.

if you don’t get the Oracle version, try the following command:

sudo update-java-alternatives -s java-7-oracle

Have fun !