title: Watchservice not being triggered
body: <p>I'm writing an application in which I'm monitoring a log file from an external program using the WatchService (<a href="http://docs.oracle.com/javase/7/docs/api/java/nio/file/WatchService.html" rel="nofollow">http://docs.oracle.com/javase/7/docs/api/java/nio/file/WatchService.html</a>).
  Whenever an EVENT_MODIFIED is triggered on the file , I read it and check if a certain string is present.
  My program works fine when I manually enter text and save the file, but when the log file is edited by the external program, the WatchService is not triggered.</p>
  
  <p>I've tried a different approach where I use a thread in which I read the file and sleep for a certain amount of time and then repeat. This does the trick, but I'd rather not poll the file every X seconds when it should be possible to just "listen" for the changes.</p>
  
  <p>Does anyone know why the WatchServices is not detecting these modifications?</p>