public class NativeUtils extends Object
http://frommyplayground.com/how-to-load-native-jni-library-from-jar| Modifier and Type | Method and Description |
|---|---|
static void |
addLibraryPath(String pathToAdd)
Adds the specified path to the java library path
|
static void |
loadLibraryFromJar(String jarpath,
String[] libs)
Loads library from current JAR archive
The file from JAR is copied into system temporary directory and then
loaded.
|
public static void loadLibraryFromJar(String jarpath, String[] libs) throws IOException
filename - The filename inside JAR as absolute path (beginning with
'/'), e.g. /package/File.extIOException - If temporary file creation or read/write operation
failsIllegalArgumentException - If source file (param path) does not
existIllegalArgumentException - If the path is not absolute or if the
filename is shorter than three characters (restriction of
File.createTempFile(java.lang.String,
java.lang.String)).Copyright © 2013-2015 Bartosz Firyn (sarxos). All Rights Reserved.