解决Linux下启动Tomcat遇到Neither the JAVA_HOME ...报错

时间:2023-01-28 04:14:58

解决Linux下启动Tomcat遇到Neither the JAVA_HOME ...报错

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

找不到JAVA_HOME路径,需要做以下变更:

找到启动路径所在的目录:

cd bin/
vi catalina.sh

加入以下信息:

export  JAVA_HOME=/home/gongzi/http/jdk1.6.0_26
export JRE_HOME=/home/gongzi/http/jdk1.6.0_26/jre