1. 查看是否系统自带openjdk.
java -version
2. 查看jdk位置
rpm -qa | grep java
3. 删除jdk
rpm -e --nodeps java-1.7.0-openjdk-1.7.0.111-2.6.7.8.el7.x86_64 rpm -e --nodeps python-javapackages-3.4.1-11.el7.noarch rpm -e --nodeps tzdata-java-2016g-2.el7.noarch rpm -e --nodeps javapackages-tools-3.4.1-11.el7.noarch rpm -e --nodeps java-1.8.0-openjdk-1.8.0.102-4.b14.el7.x86_64 rpm -e --nodeps java-1.8.0-openjdk-headless-1.8.0.102-4.b14.el7.x86_64 rpm -e --nodeps java-1.7.0-openjdk-headless-1.7.0.111-2.6.7.8.el7.x86_64
4. 查看删除是否
rpm -qa | grep java
java -version