To install Oracle Java 7:

First add the PPA to apt with:

sudo add-apt-repository ppa:webupd8team/java

 

Now update:

sudo apt-get update

 

Now we can actually install Oracle Java with the following command:

Accept the Oracle License Agreement when prompted

sudo apt-get install oracle-java7-installer

 

Java is now installed.