Uninstalling the OpenJDK of the CentOS System
The installed CentOS comes with OpenJdk and uses the Java-version command. The following information is displayed:
Java version "1.6.0"
OpenJDK Runtime Environment (build 1.6.0-b09)
OpenJDK 64-Bit Server VM (build 1.6.0-b09, mixed mode)
It is best to uninstall openjdk first and install the jdk of sun.
Check rpm-qa | grep java first
The following information is displayed:
Java-1.4.2-gcj-compat-1.4.2.0-40jpp.115
Java-1.6.0-openjdk-1.6.0.0-1.7.b09.el5
Uninstall:
Rpm-e -- nodeps java-1.4.2-gcj-compat-1.4.2.0-40jpp.115
Rpm-e -- nodeps java-1.6.0-openjdk-1.6.0.0-1.7.b09.el5
There are other commands
Rpm-qa | grep gcj
Rpm-qa | grep jdk
If openjdk source cannot be found, you can uninstall it like this.
Yum-yremovejavajava-1.4.2-gcj-compat-1.4.2.0-40jpp.115
Yum-yremovejavajava-1.6.0-openjdk-1.6.0.0-1.7.b09.el5