A general purpose Java component to enable polling on directories and aysnchronously notify client code of incoming files. It's instrumented via JMX and controllable (also) via a JMX agent, like JBoss' JMX console.
JNotify is a java library that allow java application to listen to file system events. JNotify works on both Windows (Windows 2000, XP, Vista) and Linux with INotify support (Kernel 2.6.14 and above).
The goal of the JNA project is to let you access native code from Java while avoiding C and the Java Native Interface.
One example provides notification of file system changes using the mechanism provided by the OS. FileMonitor.java
In this blog entry, the package NativeCall is used to call the Windows API to get notification about modification in given folder.
Java 7 provides a mechanism to get notificaton on file change without polling (JSR 203).
Using Threads and file lookup at regular interval.
Written and compiled by Réal Gagnon ©1998-2013
[ home ]