- 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=/usr/lib/jvm/java-6-sun
- export JRE_HOME=/usr/lib/jvm/java-6-sun/jre