public class DirectorySoSource extends SoSource
SoSource that finds shared libraries in a given directory.| Modifier and Type | Field and Description |
|---|---|
static int |
ON_LD_LIBRARY_PATH |
static int |
RESOLVE_DEPENDENCIES |
protected java.io.File |
soDirectory |
LOAD_FLAG_ALLOW_IMPLICIT_PROVISION, LOAD_RESULT_IMPLICITLY_PROVIDED, LOAD_RESULT_LOADED, LOAD_RESULT_NOT_FOUND| Constructor and Description |
|---|
DirectorySoSource(java.io.File soDirectory,
int flags)
Make a new DirectorySoSource.
|
| Modifier and Type | Method and Description |
|---|---|
int |
loadLibrary(java.lang.String soName,
int loadFlags)
Load a shared library library into this process.
|
java.io.File |
unpackLibrary(java.lang.String soName)
Ensure that a shared library exists on disk somewhere.
|
public static final int RESOLVE_DEPENDENCIES
public static final int ON_LD_LIBRARY_PATH
protected final java.io.File soDirectory
public DirectorySoSource(java.io.File soDirectory,
int flags)
flags contains RESOLVE_DEPENDENCIES,
recursively load dependencies for shared objects loaded from this directory. (We shouldn't
need to resolve dependencies for libraries loaded from system directories: the dynamic linker
is smart enough to do it on its own there.)public int loadLibrary(java.lang.String soName,
int loadFlags)
throws java.io.IOException
SoSourceSoSource.loadLibrary(java.lang.String, int).loadLibrary in class SoSourcesoName - Name of library to loadjava.io.IOExceptionpublic java.io.File unpackLibrary(java.lang.String soName)
throws java.io.IOException
SoSourceSoSource.loadLibrary(java.lang.String, int).unpackLibrary in class SoSourcesoName - Name of library to loadnull if not.java.io.IOException