Looking for Java process library

K

Kai Schlamp

Hello.

I am looking for a good way to list operating system processes from
within a Java application. There is a lot of information on the web
already. But most come up with running an external program, like "ps"
or "tasklist", and parsing the result.
Is there a Java library available that helps doing this in a system
independent way (no matter how it does it in the background)?
Another option, when one is only interested in Java processes, is to
use the LocalVirtualMachine class of jconsole.jar. The problem is that
it depends on tools.jar, which is quite large (12 MB), and I don't
like the idea to ship my product with such a huge dependent library,
just for fetching a list of running processes.
An ideas?

Regards,
Kai
 
S

schlamp

Since it's a very OS specific information, there is no real platfrom
independent way to do it. You can only check for OS and deliver the
result using the proper OS specific libraries - a wrapper class for
example.

Hello Sabine.

Yes, I know, but there is perhaps an open source library available
that does handle all that stuff (check os, choose the app to call,
parse result, error handling). Although it's not a large effort, I
don't want to reinvent the wheel.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,076
Latest member
OrderKetoBeez

Latest Threads

Top