linux tomcat 启动报错 Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At least one of these environment variable is needed to run this program

Error message

Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
At least one of these environment variable is needed to run this program

Reason: Cannot find jdk or jre path.

Solution: Open setclasspath.sh under tomcat's bin directory, add the following code, and modify the path to your own machine jdk and jre path.

export JAVA_HOME=/home/soft/jdk1.8.0_171/
export JRE_HOME=/home/soft/jdk1.8.0_171/jre

 

 

Reference: https://blog.csdn.net/jeamking/article/details/7881196

Guess you like

Origin www.cnblogs.com/L237/p/12722076.html