1.web Server
When multiple tomcat is started on the same server, we see multiple java.exe in Task Manager, and how to modify the process name when we need to monitor a tomcat without distinguishing between the Tomcat process.
Open the Tomcat_home\bin\setclasspath.bat file and locate the set _runjava= "%jre_home%\bin\java" line.
Comment out the line (change to REM set _runjava= "%jre_home%\bin\java")
Then add the following two lines below the line and save:
Copy "%java_home%\bin\java.exe" "%java_home%\bin\java_liaotiangongju.exe"
Set _runjava= "%java_home%\bin\java_liaotiangongju"
Note: Liaotangongju is the name of the process you want to see (that is, the image name in Task Manager)
2.java batch process,. sh or. bat
For example: Open the Rename bat file, as follows:
@echo off
Copy "%java_home%\bin\java.exe" "%java_home%\bin\java_liaotiangongju.exe"
Start "Chat Business handler" "%java_home%\bin\java_liaotiangongju.exe"-classpath./; /serviceconsolelib/yyc.jar; Serviceconsole. Startgo
View process: Process name is Java_liaotiangongju.exe instead of Java.exe.