Can Java Identify Any Running Application In a Machine?
1 posts in topic
Flat View  Flat View

Posted By:   Mayukh_Datta
Posted On:   Monday, April 9, 2001 10:35 PM

I want to create a program which would
maintain a log file of all the applications that were run from a machine with their time duration ,Can I do it with java?

Re: Can Java Identify Any Running Application In a Machine?

Posted By:   Luigi_Viggiano  
Posted On:   Tuesday, April 10, 2001 12:27 AM

In my knowledge, it cannot. At least by standards API. If you want to do that, you shall use JNI to access system resources.

The way to get running process is different system by system, in unix there're some system files (/proc dir) and should be implemented very easily. In Win you should use some system DLL and so on...

If you want to do your logger program in Java there's a lot of work to do in C to interface with the machine's resources. Personally I don't like Java daemons: they take more resources than other ones. In my opinion is best to do it as C daemon.

Everything can be done, but is important to chose the best way.

About | Sitemap | Contact