bmarwell / libloader

A configurable and extendable loader for native libraries to use with JNI.
Apache License 2.0
2 stars 0 forks source link

Rename suffix to file extension, allow multiple #3

Closed bmarwell closed 4 years ago

bmarwell commented 4 years ago

E.g. .dylib and .jnilib on Mac.

JNI libraries are named with the library name used in the System.loadLibrary() method of your Java code, prefixed by lib and suffixed with .jnilib. For example, System.loadLibrary("hello") loads the library named libhello.jnilib. Java HotSpot also recognizes .dylib as a valid JNI library format as of OS X v10.5.

Source: https://developer.apple.com/library/archive/documentation/Java/Conceptual/Java14Development/05-CoreJavaAPIs/CoreJavaAPIs.html

According to this site, .jnilib is regarded the older extension but should still work.

tresf commented 4 years ago

I think they're both acceptable, unless you're on Java 6, no?

bmarwell commented 4 years ago

Even if you are on java 6, both are acceptable as this library loader can only use .load() instead of .loadLibrary().

I need to document this a little better. This issue could only serve as a reminder to me so far