Home >System Tutorial >LINUX >How to remove OpenJDK in CentOS? Steps to remove OpenJDK from CentOS

How to remove OpenJDK in CentOS? Steps to remove OpenJDK from CentOS

王林
王林forward
2024-01-09 13:38:00547browse

The installed CentOS will come with OpenJdk, use the command Java -version, there will be the following information:

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 then install sun company's jdk.

Check rpm -qa | grep java

Display the following information:

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 some other commands

rpm -qa | grep gcj

rpm -qa | grep jdk

If the openjdk source cannot be found, you can also uninstall it like this

yum -y remove java java-1.4.2-gcj-compat-1.4.2.0-40jpp.115

yum -y remove java java-1.6.0-openjdk-1.6.0.0-1.7.b09.el5

The above is the detailed content of How to remove OpenJDK in CentOS? Steps to remove OpenJDK from CentOS. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:jb51.net. If there is any infringement, please contact admin@php.cn delete