MacOS – Did the most recent Mac OSX security update version 2016-001 (10.11.6) break java jnotify

javamacossoftware-update

I installed the security update 20016-001 for Mac OSx 10.11.6 this morning and now my use of sbt (0.13.8) with scala (2.11.8) and playframework (2.3.9) is giving the traceback below. I'm guessing that the update includes new shared object files that are not working with the java versions I have installed. I tried jdk 1.7.0_80 and 1.8.0_92.

java.lang.UnsatisfiedLinkError: no jnotify in java.library.path
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1886)
        at java.lang.Runtime.loadLibrary0(Runtime.java:849)
        at java.lang.System.loadLibrary(System.java:1088)
        at net.contentobjects.jnotify.macosx.JNotify_macosx.<clinit>(Unknown Source)
        at net.contentobjects.jnotify.macosx.JNotifyAdapterMacOSX.<init>(Unknown Source)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
        at java.lang.Class.newInstance(Class.java:383)
        at net.contentobjects.jnotify.JNotify.<clinit>(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at play.runsupport.JNotifyPlayWatchService$JNotifyDelegate.ensureLoaded(PlayWatchService.scala:168)
        at play.runsupport.JNotifyPlayWatchService$$anonfun$5.apply(PlayWatchService.scala:223)
        at play.runsupport.JNotifyPlayWatchService$$anonfun$5.apply(PlayWatchService.scala:179)

Update:

I ended up doing a massive clean/uninstall/reinstall of my java and scala tools as well as clearing my ~/.ivy2 cache. Something in there fixed it, but I didn't have the time to track down what it was.

Best Answer

Delete ~/.ivy (it will be recreated) and run 'activator clean'.