Registering:
test
Exception in
thread "main" java.lang.NullPointerException
at sun.nio.fs.WindowsPath.register(WindowsPath.java:847)
at sun.nio.fs.AbstractPath.register(AbstractPath.java:104)
at WatchDirTree.registerPath(WatchDirTree.java:42)
at WatchDirTree.preVisitDirectory(WatchDirTree.java:28)
at WatchDirTree.preVisitDirectory(WatchDirTree.java:18)
at java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:192)
at java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:69)
at java.nio.file.Files.walkFileTree(Files.java:2591)
at java.nio.file.Files.walkFileTree(Files.java:2624)
at WatchDirTree.registerTree(WatchDirTree.java:47)
at WatchDirTree.watchDirTree(WatchDirTree.java:52)
at WatchDirTree.main(WatchDirTree.java:90)
test directory exists.couldn't figure out where is problem