public final class JniLoader extends Object
java.library.path for slightly faster startup
times.| Modifier and Type | Field and Description |
|---|---|
static String |
JNI_EXTRACT_DIR_PROP |
| Constructor and Description |
|---|
JniLoader() |
| Modifier and Type | Method and Description |
|---|---|
static void |
load(String... paths)
Attempts to load a native library from the
java.library.path
and (if that fails) will extract the named file from the classpath
into a pre-defined directory ("com.github.fommil.jni.dir", or - if not
defined - a temporary directory is created) and load from there. |
public static final String JNI_EXTRACT_DIR_PROP
public static void load(String... paths)
java.library.path
and (if that fails) will extract the named file from the classpath
into a pre-defined directory ("com.github.fommil.jni.dir", or - if not
defined - a temporary directory is created) and load from there.
Will stop on the first successful load of a native library.paths - alternative relative path of the native library
on either the library path or classpath.ExceptionInInitializerError - if the input parameters are invalid or
all paths failed to load (making this
safe to use in static code blocks).Copyright © 2013. All Rights Reserved.