Is it possible to check the existence of process from Java in Windows.
I have its possible PID, I want to know if it is still running or not.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
See if this can help:
http://blogs.oracle.com/vaibhav/entry/listing_java_process_from_java
That post explains how to get all PIDs running on a Windows machine: you’d have to compare the output of the
cmdcall with your PID, instead of printing it.If you’re on Unix-like systems you’d have to use with
psinstead ofcmdCalling system commands from your java code is not a very portable solution; then again, the implementation of processes varies among operating systems.