Hi,
As I run 'java -version', I got
Code:
# java -version
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)
This means the active Java version is 1.7.0_45.
But as I run 'yum list installed |grep java', I got:
Code:
# yum list installed |grep java
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
glassfish-javamail.noarch 1.4.5-1.redhat_1.ep6.el5 installed
java-1.4.2-gcj-compat.x86_64 1.4.2.0-40jpp.115 installed
java-1.7.0-oracle.x86_64 1:1.7.0.51-1jpp.1.el5_10 installed
java-1.7.0-oracle-devel.x86_64 1:1.7.0.51-1jpp.1.el5_10 installed
javassist-eap6.noarch 3.18.1-1.GA_redhat_1.1.ep6.el5 installed
tzdata-java.x86_64 2014e-1.el5 installed
Here one can see the Java 1.7.0_51 is installed, not the 1.7.0_45.
As I run 'sudo update-alternatives --config java', I got
Code:
]# sudo update-alternatives --config java
There are 2 programs which provide 'java'.
Selection Command
-----------------------------------------------
*+ 1 /usr/lib/jvm/jre-1.7.0-oracle.x86_64/bin/java
2 /usr/lib/jvm/jre-1.4.2-gcj/bin/java
Enter to keep the current selection[+], or type selection number:
As I run '/usr/lib/jvm/jre-1.7.0-oracle.x86_64/bin/java -version', I got:
Code:
# /usr/lib/jvm/jre-1.7.0-oracle.x86_64/bin/java -version
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)
This means the 1.7.0_51 is installed.
How can I remove the 1.7.0_45?