We load any native library by using
Short answer: yes.
From the Javadoc for
loadLibrary: "Loads the system library specified by the libname argument. The manner in which a library name is mapped to the actual system library is system dependent."
System.mapLibraryName(libname) will return what the mapped library name will be.
This reflects the common conventions for library names:
lib prefix in Linux and Mac OS X, no prefix in Windows, plus platform dependent file extension. Note that the extension for JNI libraries on Mac OS X is
dylib as it is for other libraries. Also this mapping is not unique to the Java runtime,
gcc ... -lhello will also look for
libhello.dylib on Mac OS X).
If you don't want the runtime to do this mapping, you'd have to determine the correct filename including the extension yourself and pass this to