ср, 23 мар. 2022 г. в 14:12, Rony G. Flatscher (Apache) <r...@apache.org>: > > skip... > > startup.bat uses start to run catalina.bat in a new cmd window with: > > call "%EXECUTABLE%" start %CMD_LINE_ARGS% > > catalina.bat then starts Tomcat as: > > %_EXECJAVA% %CATALINA_LOGGING_CONFIG% %LOGGING_MANAGER% %JAVA_OPTS% > %CATALINA_OPTS% %DEBUG_OPTS% > -D%ENDORSED_PROP%="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" > -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" > -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% 2>&1 1> > D:\orx.debug\work_rii_tomcat\test.log > > This does not work.
(It does not matter, but you somehow lost "%ACTION%" at the end of the above line.) If I prefix the above line with "echo" to see what command is being executed, like this: echo %_EXECJAVA% %CATALINA_LOGGING_CONFIG% %LOGGING_MANAGER% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -D%ENDORSED_PROP%="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION% 1>>mylog.txt 2>&1 then I get the following results: a) After calling "startup.bat" or "catalina.bat start" I see the following in mylog.txt: start "Tomcat" "C:\pathtojava\java.exe" ..... org.apache.catalina.startup.Bootstrap start b) After calling "catalina.bat run" I see the following: "C:\pathtojava\java.exe" ..... org.apache.catalina.startup.Bootstrap start Note the difference. It is the "start" command that creates a new window. The "call" command that you mentioned is just a command to execute a different batch file and return to continue executing the original batch file. BTW, commands "help start" and "help call" print some reference for those commands. Looking at the reference for "start", I think your only option is to use "catalina.bat run" to start Tomcat. When I do so, the redirection works as expected. The following also works, without any modifications to the catalina.bat file: catalina.bat run 1>>mylog.txt 2>&1 or with remote debugging being enabled: catalina.bat jpda run 1>>mylog.txt 2>&1 Best regards, Konstantin Kolinko --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org