On 08/10/2017 11:18 AM, Ghislain Vaillant wrote:

> I am not sure what you mean here, though that might be because of my
> personal ignorance of how JNI works. Could you be a bit more explicit
> please?

Libraries using native code adopt various strategies to load the
external library. Sometimes the .so/.dll is provided separately from the
jar, but some libraries include it inside the jar (for example JNA does
so, the jar contains several libraries for various platforms), the
library is extracted from the classpath and copied into a temporary
directory before being loaded. If your library does so, you have to
shortcut the extraction mechanism and load directly the native library
from the filesystem (the multiarch path is already on the OpenJDK path,
so it's just a matter of calling System.loadLibrary("foo")).

Emmanuel Bourg

Reply via email to