File watching on Oracle JDK on Mac OS X and other platforms

Michael Hall mik3hall at gmail.com
Sat Nov 2 07:24:11 PDT 2013


I might just mention at this point that my trz package below does attempt a OS X kqueue WatchService. 
It passed nio basic tests but does not successfully get through the LotsOfEvents tests. It has a deadlock issue for that. I haven't figured out how to debug the problem since I am unsure how to debug kqueue and that seems to stop pumping events when the java goes into a wait. 
It is possibly questionable licensing since I started by modeling existing nio classes but in some cases had to make slight changes to my own mostly coped versions.
The kqueue implementation was to be a one of two WatchService I intended for OS X. The second would be based on fsevents which my understanding is might be more suited to larger numbers of files.

The package also includes non-WatchService related nio.2 OS X code for file attribute meta data.

I also added the code for the Apple FileManager extension since it was indicated at some point that this project might be ok with supporting the eawt extensions but possibly not the eio. So I added FileManager to my project. I'm not sure I have seen any additional support for eawt since though- like javadoc. I added a file helper companion class for FileManager, mostly based on LaunchServices API's. Determining applications associated with given file types, opening them with specified applications. 

As I recall, I haven't looked at any of this for a little bit. 

Michael Hall

trz nio.2 for OS X http://www195.pair.com/mik3hall/index.html#trz

HalfPipe Java 6/7 shell app http://www195.pair.com/mik3hall/index.html#halfpipe

AppConverter convert Apple jvm to openjdk apps http://www195.pair.com/mik3hall/index.html#appconverter







More information about the macosx-port-dev mailing list