A particular problem I was struggling with is how the libraries are loaded when running on Mac OS X. The standard naming convention for using the dynamic libraries in Mac OS X is to use "lib" prefix, and ".dylib" as the suffix. Java Virtual Machine, however, does not follow this convention when trying to load a library, and requires you to use ".jnilib" suffix (and "lib" prefix) instead.
The typical loadLibrary call:
System.loadLibrary("mine");
will search for
libmine.jnilib
in your java.library.path;
and if you have named your library libmine.dylib
, it will produce you an UnsatisfiedLinkError
exception.
1 comment:
My dear friend, this advice is still gold 15 years after you wrote it!!!
Post a Comment