标签:move environ tools packages centos pack openjdk less oar
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
删除Centos7 中原有的java1.8(openjdk)
标签:move environ tools packages centos pack openjdk less oar
原文地址:https://www.cnblogs.com/zjw0901/p/12267971.html