ragnarokkrr
3/19/2016 - 11:30 PM

From http://ubuntuhandbook.org/index.php/2014/02/install-oracle-java-6-7-or-8-ubuntu-14-04/http://askubuntu.com/questions/521145/how-to-inst


sudo add-apt-repository ppa:webupd8team/java

sudo apt-get update

sudo apt-get install oracle-java8-installer

#Change the number 8 to 6 (or 7) in the code to install Java 6 (or 7).

sudo apt-get install oracle-java8-set-default

# list alternatives
# http://askubuntu.com/questions/521145/how-to-install-oracle-java-on-ubuntu-14-04
sudo update-alternatives --display java

#set JAVA_HOME 
sudo vim /etc/environment
# include JAVA_HOME="/usr/lib/jvm/java-8-oracle"