windows下修改tomcat的startup.bat脚本文件后台运行

时间:2023-03-08 23:50:28
windows下修改tomcat的startup.bat脚本文件后台运行

1、修改startup.bat文件

rem Get remaining unshifted command line arguments and save them in the
set CMD_LINE_ARGS=
:setArgs
if ""%""=="""" goto doneSetArgs
set CMD_LINE_ARGS=%CMD_LINE_ARGS% %
shift
goto setArgs
:doneSetArgs call "%EXECUTABLE%" run %CMD_LINE_ARGS% :end

2、修改catalina.bat文件

添加以下内容,使控制台日志文件重定向到out文件

%ACTION% >> %CATALINA_HOME%/logs/catalina.%date:~,%.%date:~,%.%date:~,%.out

windows下修改tomcat的startup.bat脚本文件后台运行

3、修改setclasspath.bat文件

rem Set standard command for invoking Java.
rem Note that NT requires a window name argument when using start.
rem Also note the quoting as JAVA_HOME may contain spaces.
set _RUNJAVA="%JRE_HOME%\bin\javaw.exe"
set _RUNJDB="%JAVA_HOME%\bin\jdb" goto end :exit
exit /b :end
exit /b