Install Oracle Java 8 on Ubuntu 16.04

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-java8-installer

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