Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / November 2006

Tip: Looking for answers? Try searching our database.

How to get all the running processes in Windows Xp using Java?

Thread view: 
Jason - 13 Nov 2006 05:27 GMT
I want to get all the running processes in Java. Is there a library
that can do this,  or what can I do for this?
Any advice or suggestion will be appreciated.
kww731029@gmail.com - 13 Nov 2006 08:58 GMT
> I want to get all the running processes in Java. Is there a library
> that can do this,  or what can I do for this?
> Any advice or suggestion will be appreciated.

You can write a .dll using C or other language firstly, then you call
it in Java by JNI.
ddimitrov - 13 Nov 2006 11:39 GMT
You don't mention your operating system (keep in mind that the mere
notion of "process" is OS dependent - e.g. in some embedded
environments all you've got is coroutines).

As a quick and easy way, I'd try running a command-line utility first -
it's easier than doing JNI and gets the job done. You can use ps on
linux and use the one that comes with cygwin on windows. Also, the guys
at http://jniwrapper.com provide a nice windows integration library
that exposes much more than processes.
Daniel Pitts - 13 Nov 2006 17:40 GMT
> You don't mention your operating system (keep in mind that the mere
> notion of "process" is OS dependent - e.g. in some embedded
> environments all you've got is coroutines).
Actually, he did mention the OS in the subject. Windows XP.
Although, I don't know the answer to his question.

> As a quick and easy way, I'd try running a command-line utility first -
> it's easier than doing JNI and gets the job done. You can use ps on
> linux and use the one that comes with cygwin on windows. Also, the guys
> at http://jniwrapper.com provide a nice windows integration library
> that exposes much more than processes.
Jean-Francois Briere - 13 Nov 2006 23:10 GMT
Under Windows XP you could use Runtime.exec() with the tasklist command
then parse the result to get the information needed.
Jason - 20 Nov 2006 01:15 GMT
> Under Windows XP you could use Runtime.exec() with the tasklist command
> then parse the result to get the information needed.

This will be a good idea, thank you very much!

Jason


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.