=============>rpm -qa|grep gcj 或者 rpm -qa | grep jdk查看jdk的具体信息
=============>rpm -e --nodeps + 路径 卸载自带jdk
rpm -e --nodeps java-1.5.0-gcj-1.5.0.0-29.1.el6.x86_64命令卸载相应的jdk
rpm -e --nodeps java-1.6.0-openjdk-1.6.0.0-1.66.1.13.0.el6.x86_64
=============>
[root@CRRC dev_src]# java -version
java version "1.7.0_45"
OpenJDK Runtime Environment (rhel-2.4.3.3.el6-x86_64 u45-b15)
OpenJDK 64-Bit Server VM (build 24.45-b08, mixed mode)
[root@CRRC dev_src]# $JAVA_HOME
[root@CRRC dev_src]# rpm -qa|grep gcj
[root@CRRC dev_src]# java -version
java version "1.7.0_45"
OpenJDK Runtime Environment (rhel-2.4.3.3.el6-x86_64 u45-b15)
OpenJDK 64-Bit Server VM (build 24.45-b08, mixed mode)
[root@CRRC dev_src]# rpm -qa|grep jdk
java-1.7.0-openjdk-1.7.0.45-2.4.3.3.el6.x86_64
java-1.6.0-openjdk-1.6.0.0-1.66.1.13.0.el6.x86_64
[root@CRRC dev_src]# rpm -e --nodeps java-1.6.0-openjdk-1.6.0.0-1.66.1.13.0.el6.x86_64
[root@CRRC dev_src]# rpm -qa|grep jdk
java-1.7.0-openjdk-1.7.0.45-2.4.3.3.el6.x86_64
[root@CRRC dev_src]# rpm -e --nodeps java-1.7.0-openjdk-1.7.0.45-2.4.3.3.el6.x86_64
[root@CRRC dev_src]# rpm -qa|grep jdk
[root@CRRC dev_src]# java -version
-bash: /usr/bin/java: No such file or directory
[root@CRRC dev_src]#
+