RFR: 7134701 [macosx] Support legacy native library names

Michael McMahon michael.x.mcmahon at oracle.com
Thu Mar 29 10:25:37 UTC 2012

On 27/03/12 22:23, Michael McMahon wrote:
> Could I get the following webrev for 7u4 reviewed please?
> It is the same code change as for jdk 8
> http://cr.openjdk.java.net/~michaelm/7134701/webrev.7u4.1/
> Thanks,
> Michael.
I've updated the webrev for this 7u4 change, based on the testing yesterday.
It simplifies the original jdk 8 change (which will be updated via CR 
So, if an attempt to load a library whose name is X.dylib fails we retry 
with the name X.jnilib

The following examples show the main cases:

System.loadLibrary("foo") -> libfoo.dylib, then libfoo.jnilib
(tried in each directory of the boot library path and user library path 

System.load("/abs/path/libfoo.dylib") -> /abs/path/libfoo.dylib, then 
System.load("/abs/path/libfoo.jnilib") -> /abs/path/libfoo.jnilib
System.load("/abs/path/libfoo.bar") -> /abs/path/libfoo.bar

System.mapLibraryName("foo") -> "libfoo.dylib"

As before, this change only affects the behavior on Mac OS X.



More information about the core-libs-dev mailing list