public static final void main(String[] args) throws Exception { LogManager.getLogManager().readConfiguration(new FileInputStream("./logging.properties")); UpdatingFileTree tree = new UpdatingFileTree( new File("/Volumes/x/watch_test"), new UpdatingFileTreeListener() { public void broadcastChange(UpdatingFileTree path, boolean isDelete) { System.out.println("change: " + path.getThisFile().getName() + " " + isDelete); } }); while (true) { tree.update(); Thread.sleep(5 * 1000); } }