Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JDK 7 WatchService API and NFS file sharing

We are using [WatchService][1] API (JDK 7) to track files created in my system. And up till now, it worked ok. Every file created on my system tracked by my program.

But we have trouble when we use NFS (the directory we track actually exist on another computer in LAN).

WatchService does not work.

Can anyone tell me how to work around this situation? How can I setup NFS to support Java 7 WatchService API or can anyone tell me a better library.

Thanks all

like image 208
tnk_peka Avatar asked Jul 24 '12 10:07

tnk_peka


1 Answers

You can mix your code with Polling Watcher from OpenJDK (Polish text)

Sources

like image 62
m1k0 Avatar answered Sep 18 '22 22:09

m1k0