For one application I've unpacked the native libs to a local directory (as part of the installation process), and I've set jogamp.gluegen.UseTempJarCache to false. This used to work in the past, but recently with Java 1.8 I see errors like this:
java.lang.UnsatisfiedLinkError: Can't load library: /…/libgluegen-rt.dylib
Searching the web for this, I found some indications that simply renaming the *.jnilib that came from the Jogamp release to *.dylib should work. I tried it out, and indeed it did work. So perhaps the natives jar file for OS X should be using those names? I haven't found any official documentation on that change so far.
I'm using JOGL 2.2.1 here, but I verified that in 2.3.2 the files are still called jnilib not dylib. (I'm confused that the version field here in Bugzilla doesn't allow me selecting a version earlier than 2.4.0 as the version where the bug was found, so I couldn't fill out that required field correctly.)
$ java -version
java version "1.8.0_72"
Java(TM) SE Runtime Environment (build 1.8.0_72-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.72-b15, mixed mode)
The OS is OS X 10.11.5 (15F34).
https://github.com/LWJGL/lwjgl/commit/a6bb6e31d888c07026ac0381c2900c895765ffbb was what suggested simply renaming the files. It's also the source naming java 1.8 as the release introducing this breakage, so I'm simply quoting that.
Would it still work with previous versions of Java under OS X, for example OpenJDK or Oracle Java 1.7?
Trying to track this down: In OpenJDK the file hotspot/src/os/bsd/vm/os_bsd.cpp has this:
#define JNI_LIB_PREFIX "lib"
#define JNI_LIB_SUFFIX ".dylib"
#define JNI_LIB_SUFFIX ".so"
This should be the setting that is being used by the native implementation of System.mapLibraryName in jdk/src/share/native/java/lang/System.c. The file names .dylib since it got included into the repository in 2011. I don't know how the Apple resp. Oracle JDK gets derived from this, so I don't know for how long they supported both forms, if ever. I don't have a wide range of OpenJDK at my disposal just now to test this.
http://lists.apple.com/archives/java-dev/2012/Nov/msg00036.html reports dylib vs. jnilib naming issues with jogamp code as far back as 2012. JDK version unknown.
Now I understand why .jnilib had been used:
It seems reasonable to rename .jnilib files into .dylib, I'll do it as soon as possible.