linux安装JDK
1、下载JDK
下载地址:http://download.oracle.com/otn/java/jdk/7u80-b15/jdk-7u80-linux-x64.rpm JDK1.7
2.在linux上面执行
# rpm -ivh jdk-7u80-linux-x64.rpm
3.配置环境变量
# vi /etc/profile # 末尾加入 #set java environment export JAVA_HOME=/usr/java/jdk1.7.0_80 export CLASSPATH=.:$JAVA_HOME/lib export PATH=$PATH:$JAVA_HOME/bin
4.删除openJDK
# rpm -qa | grep java #查看安装的Java
# rpm -e --nodeps jdk名称 #卸载相关的jdk