赞
踩
- java -version
- java
- javac
- which java
- rpm -qa | grep -i jdkrm
- -rf JDK1.8.0_172 (卸载JDK)
- vi /etc/profile
- mkdir -p /usr/local/src/jdk
- cd /usr/local/src/jdk
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
- mv jdk1.8.0_131 jdk1.8
- vi /etc/profile
- export JAVA_HOME=/usr/local/src/jdk/jdk1.8
- export PATH=$PATH:$JAVA_HOME/bin
- export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
source /etc/profile
7.判断是否安装成功
java -version
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。