标签:pen pat jvm oop pre str usr led jre
yum list installed |grep java
如有有jdk版本输出证明已经安装过了。
yum -y list java*
yum -y install java-1.8.0-openjdk*
[root@hadoop10 mongod]# java -version
openjdk version "1.8.0_262"
OpenJDK Runtime Environment (build 1.8.0_262-b10)
OpenJDK 64-Bit Server VM (build 25.262-b10, mixed mode)
[root@hadoop10 mongod]# java -verbose
最后两行可以看到jdk的安装路径。
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.262.b10-0.el7_8.x86_64
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH
JAVA_HOME配置完成
标签:pen pat jvm oop pre str usr led jre
原文地址:https://www.cnblogs.com/technicianafei/p/13840293.html