Windows環境下讓tomcat startup.bat啟動時不顯示控制檯

NO IMAGE

需要做如下修改:

 找到TOMCAT_HOME\bin\setclasspath.bat

在檔案底部找到如下程式碼:

rem Don't override _RUNJAVA if the user has set it previously
if not "%_RUNJAVA%" == "" goto gotRunJava
rem Set standard command for invoking Java.
rem Also note the quoting as JRE_HOME may contain spaces.
set _RUNJAVA="%JRE_HOME%\bin\java.exe"
:gotRunJava

將 set _RUNJAVA=”%JRE_HOME%\bin\java.exe” 修改為set _RUNJAVA=”%JRE_HOME%\bin\javaw.exe”

這時再啟動tomcat就不會彈出黑色控制檯了。