There is no need to monitor the parent folder, there is a way to know if the watcher you have no longer works so you can recreate it.
The following code should help you out.
WatchService watchService = null;
String folderString = "Your path here";
do
{
Thread.sleep(1000);
File dir = new File(folderString);
if (!dir.exists())
continue;
watchService = FileSystems.getDefault().newWatchService();
Path folder = Paths.get(folderString);
folder.register(watchService,
StandardWatchEventKinds.ENTRY_CREATE,
StandardWatchEventKinds.ENTRY_DELETE,
StandardWatchEventKinds.ENTRY_MODIFY);
boolean watchStillOperational = false;
do
{
WatchKey watchKey = watchService.take();
for (WatchEvent<?> event : watchKey.pollEvents())
{
.....
}
// The following line indicates if the watch no longer works
// If the folder was deleted this will return false.
watchStillOperational = watchKey.reset();
} while (watchStillOperational)
} while(true)