tomcat starts startup.bat and flashes by

Enter the bin directory and execute the command

Questions:
1.  Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
Tomcat's startup.bat, it calls catalina.bat, and catalina.bat calls setclasspath.bat, as long as the environment variable (red) is declared at the beginning of setclasspath.bat Two lines) is ok, because the newer version will not automatically register the environment variables JAVA_HOME and JRE_HOME after the installation. Add a red mark
to the beginning of setclasspath.bat , as follows:
rem ------------------------------------ ---------------------------------------
rem Set CLASSPATH and Java options
rem
rem $Id: setclasspath.bat 505241 2007-02-09 10:22:58Z jfclere $
rem --------------------------------- ------------------------------------------

set JAVA_HOME=C:\Program Files \Java\jdk1.6.0_20
set JRE_HOME=C:\Program Files\Java\jre6


rem Make sure prerequisite environment variables are set
if not "%JAVA_HOME%" == "" goto gotJdkHome
if not "%JRE_HOME%" == "" goto gotJreHome
echo Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
echo At least one of these environment variable is needed to run this program
goto exit

so that JAVA_HOME, JRE_HOME are automatically registered every time startup.bat is run.
Run startup.bat, and prompt "Information: Server startup in xxxxx ms" OK You're done.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326016988&siteId=291194637