Giter Club home page Giter Club logo

Comments (7)

twall avatar twall commented on August 22, 2024

AFAIK, the file monitor has never worked on 64-bit windows. You are implying that this worked on windows 64-bit in version 3.3.0 of JNA.

On Mar 13, 2012, at 6:39 AM, pti wrote:

Hi,

After updating from 3.3.0 (b1) (according to jna.jar's manifest file) to 3.4.0 FileListener.fileChanged() no longer gets called.
Below is a simplified piece of code that I used for testing this issue. I'm using Windows7 64bit and jdk1.6.0_27 32bit.

public static void main(String[] args) throws Exception {
FileMonitor fm = FileMonitor.getInstance();
FileListener fl = new FileListener() {

       @Override
       public void fileChanged(FileEvent fe) {
           System.out.println(fe.getFile().getAbsolutePath() + ", " + fe.getType());
       }
   };
   fm.addFileListener(fl);

   File m = new File("C:/temp/");
   fm.addWatch(m);

   Thread.sleep(30000);
   System.out.println("woke up");

   fm.removeWatch(m);
   fm.removeFileListener(fl);

}


Reply to this email directly or view it on GitHub:
#60

from jna.

pti avatar pti commented on August 22, 2024

Sorry, I hadn't noticed that it isn't even supposed to work. I'll just return back to using the old version since it works fine for my purposes.

from jna.

dblock avatar dblock commented on August 22, 2024

Just to be clear, can you please confirm that it works in 3.3.0?

from jna.

pti avatar pti commented on August 22, 2024

Yes, FileMonitor works in 3.3.0 (b1) (Windows7 64bit and jdk1.6.0_32 32bit).

from jna.

dblock avatar dblock commented on August 22, 2024

Made a pull request, #99 with a fix.

from jna.

dblock avatar dblock commented on August 22, 2024

@twall, it works well on both 32-bit and 64-bit, fyi

from jna.

dblock avatar dblock commented on August 22, 2024

Sorry, #99 was not round enough, proper fix in #100.

from jna.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.