public class LibraryLoader extends java.lang.Object
Constructor and Description |
---|
LibraryLoader() |
Modifier and Type | Method and Description |
---|---|
void |
loadLibrary(java.lang.String libname,
boolean withFlavor)
Find the library libname as a resource, copy it to a tempfile
and load it using System.load().
|
public LibraryLoader()
public void loadLibrary(java.lang.String libname, boolean withFlavor)
Find the library libname as a resource, copy it to a tempfile and load it using System.load(). The name of the library has to be the base name, it is mapped to the corresponding system name using System.mapLibraryName(). For example, the library "foo" is called "libfoo.so" under Linux and "foo.dll" under Windows, but you just have to pass "foo" the loadLibrary().
I'm not quite sure if this doesn't open all kinds of security holes. Any ideas?
This function reports some more information to the "org.jblas" logger at the FINE level.
libname
- basename of the libraryjava.lang.UnsatisfiedLinkError
- if library cannot be founds© 2008-2013 by Mikio L. Braun and contributors