• Post Reply Bookmark Topic Watch Topic
  • New Topic

monitoring programs  RSS feed

 
Alan Shiers
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Since it is possible to execute native programs using Java, is it also possible to monitor the execution of programs as they are being launched by the user? For instance, when using a Windows environment, you can call up the Task Manager by clicking CTRL-ALT DELETE. The Task Manager keeps track of what programs are running. So, could a person write a Java application that does the same thing as Task Manager by monitoring what programs are currently running, regardless of the platform? If so, what is the approach (classes and methods used) for doing this?
Alan
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, there are no Java APIs for this. To write a Java program, you'd have to write some platform-dependent native code to link with the Java code.
 
Dmitry Melnik
Ranch Hand
Posts: 328
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
...but you still can monitor status, wait for completion, caprure console I/O, etc. of a program which you have started from your Java application
http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Runtime.html
http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Process.html
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!