更改Tomcat命令行窗体标题
2021-04-21 05:26
在windows下启动多个tomcat时。不好区分哪个tomcat相应哪个服务,能够通过下面方法设置Tomcat命令行窗体的标题:
1.在%tomcat_home%\bin\catalina.bat中找到下面代码:
搜索“noTitle”或者“_EXECJAVA”
找到:
:doStart??
shift??
if not "%OS%" == "Windows_NT" goto noTitle??
set _EXECJAVA=start "Tomcat" %_RUNJAVA%??
goto gotTitle
将一下行的tomcat字符替换成相应的标题就可以
set _EXECJAVA=start "Tomcat" %_RUNJAVA%?
在tomcat6.0.29以后的版本号则例如以下:
:doStart??
shift??
if not "%OS%" == "Windows_NT" goto noTitle??
if "%TITLE%" == "" set TITLE=Tomcat??
set _EXECJAVA=start "%TITLE%" %_RUNJAVA%??
goto gotTitle?
同理将
if "%TITLE%" == "" set TITLE=Tomcat?
改为:
if "%TITLE%" == "" set TITLE=你的应用服务名