Watcher stops after change
<p>How do you convert the Watcher below to run constantly? I want it to continue listening for files even after a change has been detected. A thread perhaps?</p>

<pre><code>import java.io.IOException;
import java.nio.file.*;
import java.util.List;

public class Listener {

    public static void main(String[] args) {

        Path myDir = Paths.get("C:/file_dir/listen_to_this");

        try {
            WatchService watcher = myDir.getFileSystem().newWatchService();
            myDir.register(watcher, StandardWatchEventKinds.ENTRY_CREATE, StandardWatchEventKinds.ENTRY_DELETE, StandardWatchEventKinds.ENTRY_MODIFY);
            WatchKey watckKey = watcher.take();
            List&lt;WatchEvent&lt;?&gt;&gt; events = watckKey.pollEvents();
            for (WatchEvent event : events) {
                if (event.kind() == StandardWatchEventKinds.ENTRY_CREATE) {
                    System.out.println("Created: " + event.context().toString());
                }
                if (event.kind() == StandardWatchEventKinds.ENTRY_DELETE) {
                    System.out.println("Delete: " + event.context().toString());
                }
                if (event.kind() == StandardWatchEventKinds.ENTRY_MODIFY) {
                    System.out.println("Modify: " + event.context().toString());
                }
            }
        } catch (IOException | InterruptedException e) {
            System.out.println("Error: " + e.toString());
        }
    }
}
</code></pre>
