Java NIO – Watch a directory

Java 7 implemented the watch service which can be used to watch changes in a directory. The watch service is thread safe and hence multiple threads can use it. Here’s a complete example of the watch service. All steps are explained in the example

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.