Install Java version 8
Install the common software-properties to be able to use the add-app-repository command.
shell
jitsejan@jjsvps:~$ sudo apt-get install software-properties-common
Add the Java repository to the Ubuntu sources.
shell
jitsejan@jjsvps:~$ sudo add-apt-repository ppa:webupd8team/java
Update the sources to retrieve the new Java repository.
shell
jitsejan@jjsvps:~$ sudo apt-get update
Install Java version 8.
shell
jitsejan@jjsvps:~$ sudo apt-get install oracle-java8-installer