删除Centos7 中原有的java1.8(openjdk)

1、检测java版本

[zjw@zjw-centos ~]$ java -version
openjdk version "1.8.0_242"
OpenJDK Runtime Environment (build 1.8.0_242-b08)
OpenJDK 64-Bit Server VM (build 25.242-b08, mixed mode)

2、查询现有已安装的openjdk模块
[zjw@zjw-centos ~]$ rpm -qa | grep java
python-javapackages-3.4.1-11.el7.noarch
tzdata-java-2019c-1.el7.noarch
java-1.8.0-openjdk-headless-1.8.0.242.b08-0.el7_7.x86_64
java-1.7.0-openjdk-1.7.0.241-2.6.20.0.el7_7.x86_64
java-1.7.0-openjdk-headless-1.7.0.241-2.6.20.0.el7_7.x86_64
java-1.8.0-openjdk-1.8.0.242.b08-0.el7_7.x86_64
javapackages-tools-3.4.1-11.el7.noarch

3、删除模块

sudo yum -y remove python-javapackages-3.4.1-11.el7.noarch
sudo yum -y remove tzdata-java-2019c-1.el7.noarch

4、验证

rpm -qa | grep java

 

posted @ 2020-02-06 11:13  张疯牛  阅读(1385)  评论(0编辑  收藏  举报
石家庄坦图计算机科技有限公司 石家庄市丰收路220号泽润大厦17层