Closed harideva16 closed 3 years ago
This sounds like a very generic problem, why is not relevant at the PROJ-JNI issue tracker?
Hello @harideva16. Indeed this is a generic Java question not specific to PROJ-JNI. Yes, the library name (mypl
in above example) will be translated to the platform-specific name (mypl.dll
, libmypl.so
or libmypl.dylib
) automatically by the Java environment. However it may not be sufficient for allowing Java to find it. It depends also on other factors such as environment variables which control in which directory the system will search for the library.
Java native interface (jni) allows calling native libraries
I use the following code to load native library.
If I generate native library in windows os the native library's name comes
mypl.dll
But , in Linux os the native library's name comes
libmypl.so
and in mac it comeslibmypl.dylib
Will this code
System.loadLibrary("mypl");
load native library correcty after creating JPackage in linux and mac ?