public class JarLibraryLoader extends Object implements LibraryLoader
platform
(CPU architecture and OS)
it is running on and load the appropriate shared library.
Given a library path and name this loader looks for a native library with path
[libraryPath]/[arch]/[os]/lib[name].[ext]Constructor and Description |
---|
JarLibraryLoader()
Initialize a new instance that looks for shared libraries located in the same jar
as this class and with a path starting with
lib . |
JarLibraryLoader(CodeSource codeSource,
String libraryPath)
Initialize a new instance that looks for shared libraries located in the specified
directory of the supplied code source.
|
Modifier and Type | Method and Description |
---|---|
boolean |
load(String name,
boolean verify)
Load a shared library, and optionally verify the jar signatures.
|
public JarLibraryLoader()
lib
.public JarLibraryLoader(CodeSource codeSource, String libraryPath)
codeSource
- Code source containing shared libraries.libraryPath
- Path prefix of shared libraries.public boolean load(String name, boolean verify)
load
in interface LibraryLoader
name
- Name of the library to load.verify
- Verify the jar file if signed.Copyright © 2017. All rights reserved.