jpatchwatch is a Java library for monitoring directories for changes. It uses the host platform’s native OS functions to achieve this to avoid polling.
The following events on a directory can be monitored:
File creation and deletion
Changes in subdirectories* (recursive monitoring)
Invalidation (a watched directory becomes unavailable)
(*) selected platforms only, see Features.
Currently the following platforms are supported natively:
Windows (Windows 2000, XP, Vista, 7, 32bit/64bit)
Linux (x86, 32bit/64bit)
Mac OS X
(x86, 32bit/64bit, tested on 10.5)
(PPC, tested on 10.4)
FreeBSD (x86, 32bit)
Minimum required Java Platform:
Because jpathwatch’s native libraries are packaged within its JAR file, there is no setup required that’s common to most Java libraries leveraging native code. It works just like any other pure Java library: Drop it into your IDE, and it just works. For this reason, jpathwatch can also be easily integrated into Java WebStart applications.
jpathwatch is open source under the GNU General Public License with Classpath Exception.
jpathwatch is maintained and developed by Uwe Pachler.