Linux用yum安装Java环境
来自CloudWiki
前期准备
操作步骤
yum list java*
检索1.8的列表
yum list java-1.8*
安装1.8.0的所有文件
yum install java-1.8.0-openjdk* -y
使用命令检查是否安装成功
java -version
我们可以在终端中输入java来检测是否配置成功
java
如果配置成功便会显示提示信息
[root@localhost ~]# java
Usage: java [-options] class [args...] (to execute a class) or java [-options] -jar jarfile [args...] (to execute a jar file) where options include: -d32 use a 32-bit data model if available -d64 use a 64-bit data model if available -server to select the "server" VM The default VM is server, because you are running on a server-class machine.
参考文档: