Installin Tomcat on Windows 7

2019-08-19 00:08发布

问题:

I am looking to install Tomcat. So, I unzipped the file, set CATALINA_HOME to the path name I see on the command line (c:\Users\myName\apache-tomcat-7.0.40 on my machine) and my setenv.bat looks like as follows:

set "JRE_HOME=C:\Program Files\Java\jre6\bin;"
set "JAVA_HOME=C:\Program Files\Java\jdk1.7.0_07\bin;"
exit /b 0

I also tried

set "JRE_HOME=C:\Program Files\Java\jre6;"
set "JAVA_HOME=C:\Program Files\Java\jdk1.7.0_07;"
exit /b 0

and just

set "JRE_HOME=C:\Program Files\Java\jre6;"
exit /b 0

However, when I invoke startup.bat, I keep getting the error that "The JRE_HOME environment variable is not defined properly...".

the path name there C:\Program Files\Java\jre6 is the one on my PATH variable of Windows/System Environment variables. JRE and JDK have been running since months on this machine-- they are installed fine.

Where am I wrong ?

Note: I saw installing Tomcat 7.0.37; CATALINA_HOME not defined correctly among many other Tomcat installation Qs.

回答1:

Try removing the semi-colon at the end, e.g.:

set "JRE_HOME=C:\Program Files\Java\jre6"