Hey guys,
Does anyone know whether there is something similar to FileSystemWatcher (found in C#) in Java. I need to use this to monitor a folder (Windows path) for changes.
Thanks in advance for all your help.
Printable View
Hey guys,
Does anyone know whether there is something similar to FileSystemWatcher (found in C#) in Java. I need to use this to monitor a folder (Windows path) for changes.
Thanks in advance for all your help.
You either have to wait a bit for Java 1.7 to be released; it can do it for you (or so I read) or craft your own class(es); have a look at the File.list() and File.listFiles() methods; there is no such thing as a DirectoryChangeListener in Java versions prior to 1.7.
kind regards,
Jos
Hey,
First and foremost thanks for your help. I can wait a month or two however I cannot delay much longer than that. I will probably try to implement a simple version or use a library, I found jNotify and seems to have potential. I will give that a closer look. Thanks again