Getting list of OS prosesses into JAva Application
I need to get all the currently executing processes under windows2000 OS into my java process. ( U can view those processes list if u go into task manager & selecing processes). But i need these list to be accessed from my java application . How can i do so... plz help me..
Regards,
Deepak.
Your going to need to expose a C call via JNI OR
find a way to shell out and run a command line application that you can re-direct the output on.
There are a lot of command line utilitues used by system administrators that allows them to see or kill a running process.
Not sure how to pull this off for Windows 2000.
http://www.networkclue.com/os/Windows/commands/
Here is a good place to start looking for command line tools. Some of these even give you the C/C++ source so you could easily call it via JNI if you have a C/C++ compiler.
Regards,
what I was looking for is a small footprint piece of software that would check the processes every 30 seconds or 1 minute and create a daily log of applications in use, for how long the window is Active, etc...
There is a lot of software that does this kind of thing but b/c this would be done in corporate environment, we have to be very careful about collecting too much data which would cause privacy concerns. Instead we would really just want the application name(s) which could be derived from the processes, the time each window is active (start/end times would be ok), website names visted using any web browser (usually IE), and all this logged then emailed nightly. The main focus is to collect data on which applications are used, how often, which run in parallel, etc...
if this is something you think you can do please let me know.
thanks!