检查是否按照JDK及卸载
yum list installed|grep java
卸载
yum -y remove java-1.6.0-openjdk* //表时卸载所有openjdk相关文件输入
yum -y remove tzdata-java.noarch //卸载tzdata-java
安装JDK
- 查看JDK软件包列表
yum list java*
2.选择要安装的包
yum install -y java-1.8.0-openjdk-devel.x86_64
3,确认安装完成
[root@localhost ~]# java -version
openjdk version "1.8.0_191"
OpenJDK Runtime Environment (build 1.8.0_191-b12)
OpenJDK 64-Bit Server VM (build 25.191-b12, mixed mode)
网友评论