public class NativeLibraryLoader
extends java.lang.Object
| 限定符和类型 | 方法和说明 |
|---|---|
static NativeLibraryLoader |
getInstance()
Get a reference to the NativeLibraryLoader
|
void |
loadLibrary(java.lang.String tmpDir)
Firstly attempts to load the library from java.library.path,
if that fails then it falls back to extracting
the library from the classpath
loadLibraryFromJar(java.lang.String) |
public static NativeLibraryLoader getInstance()
public void loadLibrary(java.lang.String tmpDir)
throws java.io.IOException
loadLibraryFromJar(java.lang.String)tmpDir - A temporary directory to use
to copy the native library to when loading from the classpath.
If null, or the empty string, we rely on Java's
File.createTempFile(String, String)
function to provide a temporary location.
The temporary file will be registered for deletion
on exit.java.io.IOException - if a filesystem operation fails.