Install Java 8 Ubuntu
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get -y update
sudo apt-get -y install oracle-java8-installer
sudo vim /etc/environment
Add this at the end of the file
JAVA_HOME="/usr/lib/jvm/java-8-oracle"
source /etc/environment