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

先看Tomcat的startup.bat,它调用了catalina.bat,而catalina.bat则调用了setclasspath.bat。只要在setclasspath.bat的开头声明环境变量,打开tomcat的bin目录下面的setclasspath.sh,添加红色部分,路径自己修改

#!/bin/sh
# -----------------------------------------------------------------------------
#  Set CLASSPATH and Java options
#
#  $Id: setclasspath.sh 467182 2006-10-23 23:47:06Z markt $
# -----------------------------------------------------------------------------

export JAVA_HOME=/opt/jdk1.5.0_15
export JRE_HOME=/opt/jdk1.5.0_15/jre

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/e2f08680a975a7203c00fb8e8c643c1c.html