Results 1 to 4 of 4
  1. #1
    Tyron is offline Member
    Join Date
    Nov 2010
    Posts
    5
    Rep Power
    0

    Default Something similar to FileSystemWatcher in Java

    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.

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,663
    Blog Entries
    7
    Rep Power
    21

    Default

    Quote Originally Posted by Tyron View Post
    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

  3. #3
    Tyron is offline Member
    Join Date
    Nov 2010
    Posts
    5
    Rep Power
    0

    Default

    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

  4. #4
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,663
    Blog Entries
    7
    Rep Power
    21

    Default

    Quote Originally Posted by Tyron View Post
    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.
    Java 1.7 is delayed and rescheduled for (mid?) 2011; it should have been release mid this year but alas ... I don't know jNotify but I wish you all the luck with your implementation.

    kind regards,

    Jos

Similar Threads

  1. Replies: 7
    Last Post: 04-10-2010, 11:46 AM
  2. GUI plugin development tool similar to Netbeans?
    By DavidG24 in forum New To Java
    Replies: 1
    Last Post: 05-02-2009, 09:43 PM
  3. Replies: 1
    Last Post: 06-23-2008, 06:46 AM
  4. Java Application Interface similar with Windows Themes
    By Heracles Choe in forum AWT / Swing
    Replies: 9
    Last Post: 05-02-2008, 03:47 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •