Centos搭建Java运行环境

运行命令查看是否安装了OpenJDK。
rpm -qa | grep java
如下图所示:
QQ20180201-202245.png

运行卸载命令:
rpm -e --nodeps java-1.8.0-openjdk-headless-1.8.0.161-3.b14.el6_9.i686
rpm -e --nodeps java-1.8.0-openjdk-1.8.0.161-3.b14.el6_9.i686

下载系统对应rpm包。执行命令:
rpm -ivh jdk-8u161-linux-i586.rpm
验证:
java -version

java version "1.8.0_161"
Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
Java HotSpot(TM) Server VM (build 25.161-b12, mixed mode)
Last modification:September 27th, 2018 at 09:32 am
If you think my article is useful to you, please feel free to appreciate

Leave a Comment