wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.tar.gz tar –zxvf jdk-8u131-linux-x64.tar.gz mkdir -p /usr/java mv jdk1.8.0_131 /usr/java/ vi /etc/profile JAVA_HOME=/usr/java/jdk1.8.0_131 CLASSPATH=$CLASSPATH:$JAVA_HOME/lib PATH=$PATH:$JAVA_HOME/bin export PATH JAVA_HOME CLASSPATH unlink /usr/bin/java chmod +x /usr/java/jdk1.8.0_131/bin/* source /etc/profile java -version javac -version