If System.mapLibraryName(libName) returns a .dylib filename then we replace it to .jnilib and returns. It looks like a bug, why we change the native lib extension to different if it supported by the runtime system and was returned by it. It works when I specify java.library.path with the .dylib lib.
I suppose we could change the Library.map method so that it returns a String[] and iterate on this array in the Library.doLoad method.
@Tolsi Would you mind creating a PR for that ?
Hi, I can't load the dylib native dependency packed in jar package because of this line https://github.com/fusesource/hawtjni/blob/c14fec00b9976ff6b84e62e483d678594a7d3832/hawtjni-runtime/src/main/java/org/fusesource/hawtjni/runtime/Library.java#L360
If
System.mapLibraryName(libName)
returns a.dylib
filename then we replace it to.jnilib
and returns. It looks like a bug, why we change the native lib extension to different if it supported by the runtime system and was returned by it. It works when I specifyjava.library.path
with the.dylib
lib.