JDK-4526561 : File system change notification events should be supported
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.io
  • Affected Version: 1.4.0,5.0
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic,windows_xp
  • CPU: generic,x86
  • Submitted: 2001-11-13
  • Updated: 2009-02-16
  • Resolved: 2009-02-16
Related Reports
Duplicate :  
Duplicate :  
Relates :  
Description
Name: nt126004			Date: 11/13/2001


java version "1.4.0-beta2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta2-b77)
Java HotSpot(TM) Client VM (build 1.4.0-beta2-b77, mixed mode)

Windows, Linux w/ 2.4 kernels, FreeBSD and Irix support asynchronous,
real time notification of file system events.  This is much more efficient
than polling which is the only option in Java right now.

Two similiar such libraries for C are:

Gnome VFS (discussed in mailing lists)
SGI FAM/iMon -> http://oss.sgi.com/projects/fam/

Both work or will work by reverting to polling for OS'es that don't support this
mechanism.  This would be a boon to any process that needs to monitor the file
system (development tool GUIs and app servers are two good examples).
(Review ID: 135422) 
======================================================================
Looks like Linux is moving towards using inotify (as of 2.6.13-rc3, apparently), meaning FAM is probably a dead end. Java should support inotify when running on Linux. It would be a pity if Java programmers could not write apps like

http://beaglewiki.org/Main_Page

with excellent desktop integration and responsiveness.

Comments
EVALUATION This feature has been addressed by the new file system API defined by JSR-203.
16-02-2009

WORK AROUND Name: nt126004 Date: 11/13/2001 Customer Workaround : Poll the file system or implement the feature yourself using JNI. ======================================================================
15-09-2004

EVALUATION This will be considered in the filesystem work slated for 1.5. -- ###@###.### 2002/4/25
04-10-0191