public final class MFNativeLibraryLoader extends Object
System.loadLibrary(String)
,
upon failure falls back to the base directory of the given class package or the jar the class
is in. This way, a native library is found, if it is located in the same directory as a particular jar, identified
by a specific class from that jar.Modifier and Type | Method and Description |
---|---|
static String |
findFile(String name,
Class baseClass,
FileFilter filter)
Finds a file that is either in the classpath or in the same directory as a given class's jar.
|
static boolean |
loadLibrary()
Loads the MFSampledSP library.
|
static void |
loadLibrary(String libName)
Loads a library.
|
static void |
loadLibrary(String libName,
Class baseClass)
Loads a library.
|
public static boolean loadLibrary()
public static void loadLibrary(String libName)
libName
- name of the library, as described in System.loadLibrary(String)
);public static void loadLibrary(String libName, Class baseClass)
libName
- name of the library, as described in System.loadLibrary(String)
);baseClass
- class that identifies the jarpublic static String findFile(String name, Class baseClass, FileFilter filter) throws FileNotFoundException
name
- (partial) filenamebaseClass
- base classfilter
- filter that determines whether a file is a matchFileNotFoundException
- if a matching file cannot be foundCopyright © 2011–2018 tagtraum industries incorporated. All rights reserved.