List of utility methods to do Library Load
boolean | loadLibrary(String filename, String targetLibFolder) Load the JNI library directly by using the file name try { System.load(targetLibFolder + File.separator + filename); return true; } catch (Exception e) { return false; |
boolean | loadSystemLibrary(String filename) Load the JNI library from the folder specified by java.library.path try { System.loadLibrary(filename); return true; } catch (Exception e) { return false; |
void | loadSystemLibrary(String library) Checks for the presence of a system library (.dll or .so file) by attempting to load it. File libraryFile = new File(library); if (libraryFile.isAbsolute()) { System.load(library); } else { System.loadLibrary(library); |