abstractj/kalium — pull request #1 by wmeissner (2013-03-31 09:48:23+00:00)
Title: Avoid direct usage of FFIProvider interface, and make failure to load more robust

Generally, user code shouldn't use anything in the jnr.ffi.provider package, so I changed the library loading to use LibraryLoader.create(). I also added in /usr/local/lib and /opt/local/lib so the library will be found on OSX without setting LD_LIBRARY_PATH.

This also stands up a dummy instance of Sodium that delays throwing UnsatisfiedLinkError until methods are invoked, instead of throwing UnsatisfiedLinkError on load, which in turn causes the NaCL class to fail to load - which will generally be seen as the non-obvious NoClassDefFoundError.

The dummy-instance-on-fail functionality will also be in the next version of jnr-ffi.