troubleshooting Question

get pid of a running java application

Avatar of cspm2003
cspm2003 asked on
Windows OSMicrosoft Legacy OSWindows Server 2003
8 Comments2 Solutions6153 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!
ASKER CERTIFIED SOLUTION
b0fh

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Log in to continue reading
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform for $9.99/mo
View membership options
Unlock 2 Answers and 8 Comments.
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
The Value of Experts Exchange in My Daily IT Life

Experts Exchange (EE) has become my company's go-to resource to get answers. I've used EE to make decisions, solve problems and even save customers. OutagesIO has been a challenging project and... Keep reading >>

Mike

Owner of Outages.IO
Phoenix, Arizona, United States
Member Since 2016
Join a full scale community that combines the best parts of other tools into one platform.
Unlock 2 Answers and 8 Comments.
View membership options
“All of life is about relationships, and EE has made a virtual community a real community. It lifts everyone's boat.”
William Peck

Member since 2004