错误:
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