wood burning stoves 2.0*
The moose likes Java in General and the fly likes Event processing in Action: Catch executable file events Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Event processing in Action: Catch executable file events" Watch "Event processing in Action: Catch executable file events" New topic
Author

Event processing in Action: Catch executable file events

Tariq Rafique
Greenhorn

Joined: Jul 21, 2010
Posts: 9
Hi Opher and peter,

Is there anyway to catch windows executable file start/stop events in java. I am working on a data logging app. I need to catch start and stop event of a window executable and log it. Then monitoring files in a particular folder being updated by executable and learn which file is being updated/deleted/created and log it too.

Guide me with your suggestions.

Knowledge is a treasure and Question is its key
Opher Etzion
author
Greenhorn

Joined: Aug 04, 2010
Posts: 14
Hi Tariq.

To be honest, I don't know the answer to your question.
The book is about how event are processed; events can get from many sources, and the way the event is created/observed/instrumented is particular to the specific source, so try to address your question to Windows experts.

cheers,

Opher
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

For something like that you'd be better off writing in native code from the beginning, as you'll need to hook into OS events.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19723
    
  20

I know that the last executed programs are stored in the Windows registry, so there probably is an event for starting programs. I honestly have no idea if there is an event for ending programs.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Tariq Rafique
Greenhorn

Joined: Jul 21, 2010
Posts: 9
Thanks to all here for valuable suggestions.

Like Opher said
the way the event is created/observed/instrumented is particular to the specific source


Is there any best practices to handle events to a particular type of source in java (e.g. SWING, Web etc.).
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Event processing in Action: Catch executable file events