I'd like to use a file watcher to watch for a file containing a port number that will be created by a process I'm running with a run config. What's the best way to achieve this? I know the full path the port will be written to. Should I use the FileWatcher interface for this, or is the native JDK7 watcher a better fit? When using the FileWatcher, are the events received immediately when the underlying FS is updated, or only when the VFS is refreshed?