Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing the process name

Status
Not open for further replies.

craigey

Technical User
Apr 18, 2002
510
GB
Hi,

I'm using tomcat on a windows machine. It's called via a bat file which in turns calls catalina.bat

Only thing is when I check the process name using task manager I only see java.exe. & I have several other java apps running, so I can't tell which is which. Is is possible to set the name to something else using a parameter in the bat / config files?

 
Windows task manager lists the process names of the executable which is running.

Tomcat is not actually an executable - its java code, running inside a JVM, which has the executable process name of "java.exe".

So .... no.

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
Thanks for that. I did some more searching & came to the same conclusion. Although making a copy of java.exe, changing the name to Java_tomcat.exe & editing the startup bat file to point to java_tomcat.exe works - but it's an ugly hack!
 
Actually, if you wanted to be a complete madman (and I seriously discourage you do this, as it is a bit daft), you could do this :

Copy JAVA_HOME/bin/java.exe to JAVA_HOME/bin/tomcat.exe

Alter TOMCAT_HOME/bin/setclasspath.bat to instead of invoking "java", invoke "tomcat".

This would be done by changing this line :

set _RUNJAVA="%JAVA_HOME%\bin\java"

to this line :

set _RUNJAVA="%JAVA_HOME%\bin\tomcat"


--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
Hehehehe - didn't see your previous post then.

Dodgy hack indeed it would be !

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top