Monitor file in Java on Linux 64bits

Posted by Tim on Stack Overflow See other posts from Stack Overflow or by Tim
Published on 2010-06-03T02:25:04Z Indexed on 2010/06/03 2:44 UTC
Read the original article Hit count: 268

Filed under:
|

I'd like to be notified when a file has been created, deleted or changed, but not using polling mechanism.

I have surveyed related Java API that can use.(EX:JNotify, JPathWatch and JXFileWatcher)

Those APIs provide file monitor by using native component on OS. But I met the same problem is that they can't run on Linux 64bits, because native component in those APIs donen't support Linux 64bits, and this confused me for a long time.

I also know that there'll be a WatchService API as part of NIO2 in JDK7, but JDK7 has not released yet.

So, can any one suggest me a better solution? Very Thanks.

© Stack Overflow or respective owner

Related posts about java

Related posts about linux