启动tomcat时报Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
解决方法:
在安装目录下bin文件中找到startup.bat,用记事本打开后在bat文件中开头声明环境变量:
rem ---------------------------------------------------------------------------
rem Start script for the CATALINA Server
rem
rem $Id: startup.bat 895392 2010-01-03 14:02:31Z kkolinko $
rem ---------------------------------------------------------------------------
set JAVA_HOME=E:\Program Files (x86)\Java\jdk1.6.0_33
set JRE_HOME=E:\Program Files (x86)\Java\jre6
rem Guess CATALINA_HOME if not defined
set "CURRENT_DIR=%cd%"
if not "%CATALINA_HOME%" == "" goto gotHome
set "CATALINA_HOME=%CURRENT_DIR%"
if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
cd ..
红色字体部分 添加自己本地jdk、jre路径即可。