public class NativeLibraryLoader extends Object
Modifier and Type | Method and Description |
---|---|
static void |
load(String fileName,
String libName) |
static void |
loadLibraryFromClasspath(String path)
Loads library from classpath
The file from classpath is copied into system temporary directory and then loaded.
|
public static void loadLibraryFromClasspath(String path) throws IOException
path
- The file path in classpath as an absolute path, e.g. /package/File.ext (could be inside jar)IOException
- 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 © 2012–2021 Pi4J. All rights reserved.