- apt-get is installed
- You have
#add repository from webup8team & install oracle java and set as default
sudo add-apt-repository ppa:webupd8team/java sudo apt-get update
sudo apt-get install oracle-java8-set-default
If you have other java installed previously, you might want to complete remove them first.
sudo apt-get purge openjdk-\* There's a long description on how to install Oracle Java on WikiHow if you want to install them from scratch.