Each time I do this, I have to search the Web to remember where the PPA is and what packages to install, so this time I’m summarizing the steps here:
- Add the WebUpd8Team Java PPA:
sudo add-apt-repository ppa:webupd8team/java
- Install the installer package (downloads the Oracle installer from Oracle’s repository):
sudo apt-get update sudo apt-get install oracle-java7-installer
- To set up required environment variables:
sudo apt-get install oracle-java7-set-default
For details and troubleshooting tips, see: https://coderwall.com/p/xii-fq