标签:
rpm -qa | grep jdk // 显示的后面都需要卸载
cd /usr/program
chmod 755 jdk-6u45-linux-x64.bin
./jdk-6u45-linux-x64.bin //安装java1.6
yum -y remove java-1.7.0-openjdk-1.7.0.111-2.6.7.2.el6_8.x86_64 java-1.6.0-openjdk-1.6.0.40-1.13.12.6.el6_8.x86_64
vi /etc/profile
# set java environment
export JAVA_HOME=/usr/program/jdk1.6.0_45
export JRE_HOME=/usr/program/jdk1.6.0_45/jre
export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib
export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH
chmod +x /etc/profile
source /etc/profile
java -version
标签:
原文地址:http://www.cnblogs.com/ssslinppp/p/5923298.html