1. linux下tomcat无法启动 
  2.  
  3.  
  4. 错误:  
  5. Neither the JAVA_HOME nor the JRE_HOME environment variable is defined  
  6. At least one of these environment variable is needed to run this program 
  7.  
  8. 先看Tomcat的startup.bat,它调用了catalina.bat,而catalina.bat则调用了setclasspath.bat。只要在setclasspath.bat的开头声明环境变量,打开tomcat的bin目录下面的setclasspath.sh,添加红色部分,路径自己修改  
  9.  
  10. #!/bin/sh  
  11. # -----------------------------------------------------------------------------  
  12. #  Set CLASSPATH and Java options  
  13. #  
  14. #  $Id: setclasspath.sh 467182 2006-10-23 23:47:06Z markt $  
  15. # -----------------------------------------------------------------------------  
  16.  
  17. export JAVA_HOME=/usr/lib/jvm/java-6-sun  
  18. export JRE_HOME=/usr/lib/jvm/java-6-sun/jre