安装jre
sudo yum install java-1.8.0-openjdk
此时,执行java -version
openjdk version "1.8.0_111"
OpenJDK Runtime Environment (build 1.8.0_111-b15)
OpenJDK 64-Bit Server VM (build 25.111-b15,mixed mode)
执行javac -version,显示没有此命令
安装java开发工具
sudo yum install java-1.8.0-openjdk-devel
执行javac -version
javac 1.8.0_111