troubleshooting Question

get pid of a running java application

Avatar of cspm2003
cspm2003 asked on
Windows Server 2003Windows OSMicrosoft Legacy OS
8 Comments1 Solution6153 ViewsLast Modified:
Hello,

I have the following problem: I have to get the pid of a running java application. the problem is that I do not directly start the java app, instead I run a bat or exe file which does some other stuff and in the end runs the java app.
In task manager it just shows up as java.exe but there are multiple java applications running on the server and I must find out which one to shut down.
The application opens tcp port 5555. I tryed to use netstat -o which works, but it is too slow! There are many open ports on the server and the netstat takes > 1 minute.
A nother way I could think of was to edit the batch file so that it gets the the pid of the java app when it is started and writes it to a file but II dont know how to get the pid within a batch file.

The server is running server2k3 if that helps any.

thx a ton in advance!
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 8 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 8 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros