1

I need a Java way to find a running OS process from which I know to name and path of the executable. I want to look whether it is running right now and I need a way to kill the process if I found it.

My Question is a similar to how-to-find-and-kill-running-win-processes-from-within-java but not restricted to windows.

Am I forced to do an implementation per platform or is there some trick/library/api I'm missing that can do this?

2
  • 4
    Theres no platform independent way of doing this afaik. Commented Jan 22, 2013 at 18:34
  • 2
    There seem to be some libraries mentioned here that might do what you are looking for: stackoverflow.com/questions/1192081/… Commented Jan 22, 2013 at 18:40

1 Answer 1

5

The SIGAR library has some pretty cool support for stuff like this. It has java APIs for listing and killing system processes.

Sign up to request clarification or add additional context in comments.

1 Comment

Havnt had time to test it yet, but looks what im after

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.