sudo apt-get install openjdk-8-jdk
sudo vim /etc/profile
. Export the JAVA_HOME = / usr / lib / JVM / jdk1 . 8 .0_144 directory ## to be replaced is to be noted here own decompression jdk directory Export the JRE_HOME = $ {the JAVA_HOME} / JRE Export the CLASSPATH =:. $ {the JAVA_HOME} / lib: the JRE_HOME} {$ / lib Export the PATH = $ {the JAVA_HOME} / bin: $ the PATH
source /etc/profile sudo update-alternatives –install /usr/bin/java java /usr/lib/jvm/jdk1.7.0_60/bin/java 300 sudo update-alternatives –config java