I am trying to monitor changes in Java code. I tried from Windows 7 I had no problems, trying to monitor an Eclipse workspace from Mac Snow Leopard I don't receive updates when Java files are created or modified inside Eclipse... I have no idea of the reason...
I don't remember having a problem with missing modifications, but I was seeing one today. The problem was that I was setting using setLongField to set the integer device ID, and setIntField to set the long file ID. It was corrupting the least significant bytes of the mtime field and causing modifications to be missed. I'm attaching a libjnotify.dylib that should fix that issue.
I'm unable to reproduce missing file creations with 0.93. Try running the example in the jar file(java -Djava.library.path=<path to libs> -jar jnotify.jar) and make sure that the project is actually inside the workspace folder. Please provide more details if the problem persists.
libjnotify.dylib with setLongField/setIntField fix
I am having strange problems as well:
Running jnotify on Lion works somewhat: When I save a file in Emacs the .#FILENAME creation/removal gets notified about, but the actual modification of the file I saved gets no notification. I guess it is something to do with the kernel merging modifications or something?
Running jnotify on Snow Leopart gives no notifications at all!
-------------------8<------------------
christian-wannerstedts-macbook-pro:tmp martin$ mkdir test_jnotify
christian-wannerstedts-macbook-pro:tmp martin$ cd test_jnotify/
christian-wannerstedts-macbook-pro:test_jnotify martin$ unzip ../jnotify-lib-0.93.zip
Archive: ../jnotify-lib-0.93.zip
inflating: CHANGELOG
creating: CVS/
inflating: CVS/Entries
extracting: CVS/Repository
inflating: CVS/Root
inflating: README
inflating: jnotify-0.93-src.zip
inflating: jnotify-0.93.jar
inflating: jnotify-native-linux-0.93-src.zip
inflating: jnotify-native-macosx-0.93-src.zip
inflating: jnotify-native-win32-0.93-src.zip
inflating: jnotify.dll
inflating: jnotify_64bit.dll
inflating: lgpl.txt
inflating: libjnotify.dylib
inflating: libjnotify.so
christian-wannerstedts-macbook-pro:test_jnotify martin$ java -Djava.library.path=. -jar jnotify-0.93.jar .
Monitoring /Users/martin/tmp/test_jnotify, ctrl+c to stop
-------------------8<------------------
Then I edit a few files in that directory, and nothing further gets output from the java process.
Have you tried the attached library?
Ah, I thought I had, but perhaps not? Lots of files copied back and forth.
Now when I tested with the attached libjnotify.dylib on Lion it actually worked just as on Linux!
I am looking forward to testing it on my colleagues Snow Leopard today.
As a side note, would you be interested in a patch I made that makes the java.library.path setting unnecessary? I just put the libs in the jar, and instead of System.loadLibrary I do System.load on a temporary file that I spooled from the libraries in the jar.
Ok, now I tested it on Snow Leopard (Darwin christian-wannerstedts-macbook-pro.local 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386), and no change.
So, on the bright side: the new libjnotify.dylib made it work without flaw in Lion, but it still doesn't work at all in Snow Leopard (well, not for me, anyway).
If you want to have a bit more interaction in solving this bug (cause I would really love it solved :) I would be happy to work with you over a chat or something? If so, send me an email at zondolfin at gmail dot com.
Hm, strangely enough, yesterday it seemed to work on Snow Leopard as well. Weird but good :)
Try http://sourceforge.net/projects/jnotify/files/jnotify/jnotify-0.94/jnotify-lib-0.94.zip/download
Unfortunately I am no longer working with the project where this was used, so I am unable to verify whether what you posted works...
Good V I should certainly pronounce, impressed with your site. I had no trouble navigating through all the tabs and related info ended up being truly simple to do to access. I recently found what I hoped for before you know it at all. Reasonably unusual. Is likely to appreciate it for those who add forums or something, site theme . a tones way for your client to communicate. Excellent task..
<a href="http://www.getwindows7ultimatekey.com/" title="Windows 8 Professional Key">Windows 8 Professional Key</a>
I'm really impressed with your writing skills and also with the layout on your blog. Is this a paid theme or did you modify it yourself? Either way keep up the nice quality writing, it is rare to see a nice blog like this one nowadays..
<a href="http://www.tiffanyjewelryoutletsale.com/" title="Home Page">Home Page</a>