I am trying to use this jnr-jffi library. It appears to have a dependency on jffi so I have also built that and included in my libs folder.
My code to load the native code is as follows:
MATH_LIB = LibraryLoader.create(MathLib.class).load("math");
MATH_LIB.Multiply(1, 2);
And I get the following error:
java.lang.UnsatisfiedLinkError: java.lang.UnsatisfiedLinkError: could not locate stub library in jar file. Tried [jni/Darwin/libjffi-1.2.dylib, /jni/Darwin/libjffi-1.2.dylib]
For what it's worth, I did include a folder jni
that appears to contain a bunch of native libraries for various platforms.
How I can proceed to load my native code using this library.
Please note that I have tried adding various paths when launching my project and also adding the libraries to various locations on my machine, with no success.
That would mean I need to figure out how to debug further into this? Any advice is welcome.