Java

The simplest way of installing Oracle/Sun Java in Ubuntu is to use the PPA installer from WebUpd8 team. Simply execute:

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
This should work for all Java versions.