- Windows 10+ (x86_64)
- Java 17+
- Maven 3.6+
- CMake 3.15+
- Visual Studio 2019+ or Build Tools for Visual Studio
- JNI headers (included with JDK)
git clone https://github.com/andrestubbe/FastFileWatch.git
cd FastFileWatchmkdir build
cd build
cmake .. -G "Visual Studio 16 2019" -A x64
cmake --build . --config ReleaseThis will generate fastfilewatch.dll in the build directory.
cd ..
mvn clean packageThis will generate fastfilewatch-v1.0.0.jar in the target directory, including the native DLL.
cd examples/Demo
mvn exec:javaOr run directly:
java -cp target/fastfilewatch-v1.0.0.jar fastfilewatch.DemoIf USN Journal is not available on your system, you may need to enable it:
fsutil usn queryjournal C:If it returns "The USN Journal is not active", enable it:
fsutil usn createjournal C: 64000 4096Ensure JAVA_HOME is set correctly:
$env:JAVA_HOME = "C:\Program Files\Java\jdk-17"Make sure you have the correct Visual Studio version and CMake generator for your system.