I made a library in C and I call it from Java with JNI so I have my package and a lib folder with the libMYLIB.so file. I recall it from Java writing:
static{
System.loadLibrary("MYLIB");
}
If I execute it with the option -Djava.library.path=../lib it works well.
But I need to create a jar file with my package and lib folder; so I made it and import in a more complex project.
In the big project the classes of my package are seen and used but at run-time Java fails to load MYLIB.
Is it possible to tell Java to load it from jar file? How?