1.查看jdk版本
# java -version
java version "1.4.2"
gij (GNU libgcj) version 4.1.2 20070626 (Red Hat 4.1.2-14)
2.卸载jdk
打开终端输入#rpm -qa | grep gcj
# rpm -qa | grep gcj
libgcj-devel-4.1.2-14.el5
java-1.4.2-gcj-compat-src-1.4.2.0-40jpp.112
libgcj-src-4.1.2-14.el5
libgcj-4.1.2-14.el5
java-1.4.2-gcj-compat-1.4.2.0-40jpp.112
java-1.4.2-gcj-compat-devel-1.4.2.0-40jpp.112
#
卸载
# rpm -e --nodeps java-1.4.2-gcj-compat-src-1.4.2.0-40jpp.112
# rpm -e --nodeps java-1.4.2-gcj-compat-devel-1.4.2.0-40jpp.112
# rpm -e --nodeps java-1.4.2-gcj-compat-1.4.2.0-40jpp.112
# java -version
-bash: /usr/bin/java: No such file or directory
3.安装新版本
# chmod 755 jdk-6u11-linux-i586-rpm.bin
# ./jdk-6u11-linux-i586-rpm.bin
一路空格键
Do you agree to the above license terms? [yes or no]
选择yes
# java -version
java version "1.6.0_11"
Java(TM) SE Runtime Environment (build 1.6.0_11-b03)
Java HotSpot(TM) Client VM (build 11.0-b16, mixed mode, sharing)
#
ok!
# java -version
java version "1.4.2"
gij (GNU libgcj) version 4.1.2 20070626 (Red Hat 4.1.2-14)
2.卸载jdk
打开终端输入#rpm -qa | grep gcj
# rpm -qa | grep gcj
libgcj-devel-4.1.2-14.el5
java-1.4.2-gcj-compat-src-1.4.2.0-40jpp.112
libgcj-src-4.1.2-14.el5
libgcj-4.1.2-14.el5
java-1.4.2-gcj-compat-1.4.2.0-40jpp.112
java-1.4.2-gcj-compat-devel-1.4.2.0-40jpp.112
#
卸载
# rpm -e --nodeps java-1.4.2-gcj-compat-src-1.4.2.0-40jpp.112
# rpm -e --nodeps java-1.4.2-gcj-compat-devel-1.4.2.0-40jpp.112
# rpm -e --nodeps java-1.4.2-gcj-compat-1.4.2.0-40jpp.112
# java -version
-bash: /usr/bin/java: No such file or directory
3.安装新版本
# chmod 755 jdk-6u11-linux-i586-rpm.bin
# ./jdk-6u11-linux-i586-rpm.bin
一路空格键
Do you agree to the above license terms? [yes or no]
选择yes
# java -version
java version "1.6.0_11"
Java(TM) SE Runtime Environment (build 1.6.0_11-b03)
Java HotSpot(TM) Client VM (build 11.0-b16, mixed mode, sharing)
#
ok!