I want to watch some directory for changes and her subdirectories. I tried to do this with WatchService but I can\'t know from which directory the file was changed. How can
For users who use Spring:
With Spring 4.2 WatchServiceDirectoryScanner is introduced. Now it can also catch sub directory changes.
For more information, Javadocs on WatchServiceDirectoryScanner