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.

[314 byte] By [deepakchandarana] at [2007-10-3 7:20:35]
# 1

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,

paducahWildcata at 2007-7-15 2:18:08 > top of Java-index,Desktop,Developing for the Desktop...
# 2
I did as u said.......It is working fine now...............i used c++ code & compiled to .dll file in to a shared library & i called from java using JNI.Thank u sir.
deepakchandarana at 2007-7-15 2:18:08 > top of Java-index,Desktop,Developing for the Desktop...
# 3
deepak,I am in need of an application that goes a bit further but is based on the premise above...would you be interested doing some development on the side?
cweubanksa at 2007-7-15 2:18:08 > top of Java-index,Desktop,Developing for the Desktop...
# 4
sure.....What can in do for u?
deepakchandarana at 2007-7-15 2:18:08 > top of Java-index,Desktop,Developing for the Desktop...
# 5

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!

cweubanksa at 2007-7-15 2:18:08 > top of Java-index,Desktop,Developing for the Desktop...
# 6
The thing i can do is for every fixed time (say about 5 min) i can get the list of processes running currently. Using which u can do some actions like1) to collect data on which applications are used2) approximate usage time can be calculated
deepakchandarana at 2007-7-15 2:18:08 > top of Java-index,Desktop,Developing for the Desktop...
# 7
yes... i can do the above tasks mentioned by you ....
deepakchandarana at 2007-7-15 2:18:08 > top of Java-index,Desktop,Developing for the Desktop...
# 8
If u like to continue furthur with the project u can contact meName: DeepachandaranLocation: IndiaMail: deep_esec@yahoo.co.in
deepakchandarana at 2007-7-15 2:18:08 > top of Java-index,Desktop,Developing for the Desktop...