• Post Reply Bookmark Topic Watch Topic
  • New Topic

Find out the currently running windows applications

 
Ravi Kiran Tadiparthi
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi..
Can anyone tell me how to find out the currently running applications in windows using a java program?
I wanted to write a Java Program and convert into a Windows Service, which executes every hour to find out the current open windows applications and records this to a file... Like a spyware.

Any ideas, please help.
[ October 26, 2004: Message edited by: Ravi Tadiparthi ]
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are going to have this run as a Windows Service, why not write it in VB? Your only route is to access some native code through JNI so why use Java at all?
 
Ravi Kiran Tadiparthi
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I understand that it is easier to write it in VB, but i was wondering if it is possible in Java, and how.. is it possible to call some Windows commands which returns the list of open applications?
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes it will be - the task manager uses the dll comctl32.dll (at least on XP), so there will be something in there which you could call. Look it up through Visual Interdev or whatever tool you can get your hands on to see what API it provides. Then you'll have to write JNI stuff to give Java access to its API.
 
Ravi Kiran Tadiparthi
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Paul. Shall try that.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!