Simply run the following three commands in your terminal:

sudo add-apt-repository ppa:webupd8team/java

sudo apt-get update

sudo apt-get install oracle-java7-installer

You will be asked to accept the terms and conditions, and then you’re good to go.