1.确认是否安装jdk
java -version
2.卸载java
以下都是安装步骤:
下载百度云:
http://pan.baidu.com/s/1kViNTgN
下载地址:
http://download.oracle.com/otn-pub/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/jdk-8u144-linux-x64.rpm
mkidr /home/tools -p
cd /home/tools
rz jdk-8u144-linux-x64.rpmà上传送后直接复制下面的命令运行
rpm -ivh jdk-8u144-linux-x64.rpm
ln -s /usr/java/jdk1.8.0_144/ /usr/java/jdk
echo 'export JAVA_HOME=/usr/java/jdk' >>/etc/profile
echo 'export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH' >>/etc/profile
tail -2 /etc/profile
. /etc/profile