public class NativeLibUtils extends Object
Modifier and Type | Class and Description |
---|---|
static class |
NativeLibUtils.ResolvedResource |
Constructor and Description |
---|
NativeLibUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
addLibDirToSystemProperty(File newDir,
boolean prepend)
By itself, this method is not very helpful, because the ClassLoader loads the
"java.library.path" property once at startup.
|
static File |
copy(NativeLibUtils.ResolvedResource from,
File toDir) |
static File |
extractLib(String[] resourceSearchPaths,
File destDir,
String libShortName) |
static File |
extractLib(String resourceSearchPath,
File destDir,
String libShortName) |
static void |
loadLibs(String[] resourceSearchPaths,
File extractDir,
String... libShortNames) |
static void |
loadLibs(String resourceSearchPath,
File extractDir,
String... libShortNames) |
static boolean |
onPlatform(String osPrefix,
String osArch) |
static List<String> |
possibleLibNames(String libShortName) |
static NativeLibUtils.ResolvedResource |
resolveLib(List<String> resourceSearchPaths,
String libShortName) |
static NativeLibUtils.ResolvedResource |
resolveResource(List<String> possiblePaths,
List<String> possibleNames) |
public static void loadLibs(String resourceSearchPath, File extractDir, String... libShortNames) throws IOException
IOException
public static void loadLibs(String[] resourceSearchPaths, File extractDir, String... libShortNames) throws IOException
IOException
public static File extractLib(String resourceSearchPath, File destDir, String libShortName) throws IOException
IOException
public static File extractLib(String[] resourceSearchPaths, File destDir, String libShortName) throws IOException
IOException
public static NativeLibUtils.ResolvedResource resolveLib(List<String> resourceSearchPaths, String libShortName)
public static NativeLibUtils.ResolvedResource resolveResource(List<String> possiblePaths, List<String> possibleNames)
public static File copy(NativeLibUtils.ResolvedResource from, File toDir) throws IOException
IOException
public static void addLibDirToSystemProperty(File newDir, boolean prepend) throws IOException
NativeLibUtils#addLibDirToClassLoader_FRAGILE(File)
.IOException
Copyright © 2018 Metron, Inc.. All rights reserved.