Java Utililty Methods Library Load

List of utility methods to do Library Load

  1. HOME
  2. Java
  3. L
  4. Library Load

Description

The list of methods to do Library Load are organized into topic(s).

Method

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);

AltStyle によって変換されたページ (->オリジナル) /