library.${name}.path" System property is set to a directory,
subdirectories are searched:
${platform}/${arch}"
${platform}"
${os}"
${name}-${version}" library name if the version can be determined.
${name}" library name
${name}${bit-model}-${version}" library name if the version can be determined.
${name}-${version}" library name if the version can be determined.
${name}" library name
META-INF/native/${platform}/${arch}/${library[-version]}": Store your library here if you want to embed
more than one platform JNI library on different processor archs in the jar.
META-INF/native/${platform}/${library[-version]}": Store your library here if you want to embed more
than one platform JNI library in the jar.
META-INF/native/${os}/${library[-version]}": Store your library here if you want to embed more
than one platform JNI library in the jar but don't want to take bit model into account.
META-INF/native/${library[-version]}": Store your library here if your JAR is only going to embedding one
platform library.
library.${name}.path" System property (if set)
java.io.tmpdir" System property)
${name}" is the name of library
${version}" is the value of "library.${name}.version" System property if set.
Otherwise it is set to the ImplementationVersion property of the JAR's Manifest${os}" is your operating system, for example "osx", "linux", or "windows"${bit-model}" is "64" if the JVM process is a 64 bit process, otherwise it's "32" if the
JVM is a 32 bit process${arch}" is the architecture for the processor, for example "amd64" or "sparcv9"${platform}" is "${os}${bit-model}", for example "linux32" or "osx64" ${library[-version]}": is the normal jni library name for the platform (eventually with -${version}) suffix.
For example "${name}.dll" on
windows, "lib${name}.jnilib" on OS X, and "lib${name}.so" on linuxSystem#mapLibraryName(String)
| Modifier and Type | Field and Description |
|---|---|
| private final ClassLoader | |
| private boolean | |
| private final String | |
| private String | |
| private URL | |
| pack-priv static final String | |
| pack-priv static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| private final String |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private static void | |
| private String | |
| private void | |
| private boolean | |
| private File | |
| private File | |
| private File | |
| public final String | |
| public final String | |
| public static int | |
| public final String | |
| public String | Returns: the path (should not be null once the library is loaded)Get the path to the native library loaded. |
| public URL | Returns: the url to the source (in classpath)Get the URL to the native library source that has been extracted (if it was extracted). |
| public static String | |
| public final String | |
| public final String | |
| public static String | |
| public final String | |
| public final String | |
| public final String | |
| public final String | |
| public final String | |
| public final String | |
| public final String[] | Returns: the listSearch directories for library:
|
| public synchronized void | |
| private boolean | |
| private boolean | |
| private String | |
| private static String |
| classLoader | back to summary |
|---|---|
| private final ClassLoader classLoader | |
| loaded | back to summary |
|---|---|
| private boolean loaded | |
| name | back to summary |
|---|---|
| private final String name | |
| nativeLibraryPath | back to summary |
|---|---|
| private String nativeLibraryPath | |
| nativeLibrarySourceUrl | back to summary |
|---|---|
| private URL nativeLibrarySourceUrl | |
| SLASH | back to summary |
|---|---|
| pack-priv static final String SLASH | |
| STRATEGY | back to summary |
|---|---|
| pack-priv static final String STRATEGY | |
| STRATEGY_PROPERTY | back to summary |
|---|---|
| public static final String STRATEGY_PROPERTY | |
| STRATEGY_SHA1 | back to summary |
|---|---|
| public static final String STRATEGY_SHA1 | |
| STRATEGY_TEMP | back to summary |
|---|---|
| public static final String STRATEGY_TEMP | |
| version | back to summary |
|---|---|
| private final String version | |
| Library | back to summary |
|---|---|
| public Library(String name) | |
| Library | back to summary |
|---|---|
| public Library(String name, Class<?> clazz) | |
| Library | back to summary |
|---|---|
| public Library(String name, String version) | |
| Library | back to summary |
|---|---|
| public Library(String name, String version, ClassLoader classLoader) | |
| chmod755 | back to summary |
|---|---|
| private void chmod755(File file) | |
| close | back to summary |
|---|---|
| private static void close(Closeable file) | |
| computeSha1 | back to summary |
|---|---|
| private String computeSha1(InputStream is) throws NoSuchAlgorithmException, IOException | |
| doLoad | back to summary |
|---|---|
| private void doLoad() | |
| extractAndLoad | back to summary |
|---|---|
| private boolean extractAndLoad(ArrayList<Throwable> errors, String customPath, String dir, String libName, String targetLibName) | |
| extractSha1 | back to summary |
|---|---|
| private File extractSha1(ArrayList<Throwable> errors, URL source, String prefix, String suffix, File directory) | |
| extractTemp | back to summary |
|---|---|
| private File extractTemp(ArrayList<Throwable> errors, URL source, String prefix, String suffix, File directory) | |
| file | back to summary |
|---|---|
| private File file(String... paths) | |
| getArchSpecifcResourcePath | back to summary |
|---|---|
| public final String getArchSpecifcResourcePath()
Deprecated
| |
| getArchSpecificResourcePath | back to summary |
|---|---|
| public final String getArchSpecificResourcePath() | |
| getBitModel | back to summary |
|---|---|
| public static int getBitModel() | |
| getLibraryFileName | back to summary |
|---|---|
| public final String getLibraryFileName() | |
| getNativeLibraryPath | back to summary |
|---|---|
| public String getNativeLibraryPath() Get the path to the native library loaded.
| |
| getNativeLibrarySourceUrl | back to summary |
|---|---|
| public URL getNativeLibrarySourceUrl() Get the URL to the native library source that has been extracted (if it was extracted).
| |
| getOperatingSystem | back to summary |
|---|---|
| public static String getOperatingSystem() | |
| getOperatingSystemSpecifcResourcePath | back to summary |
|---|---|
| public final String getOperatingSystemSpecifcResourcePath()
Deprecated
| |
| getOperatingSystemSpecificResourcePath | back to summary |
|---|---|
| public final String getOperatingSystemSpecificResourcePath() | |
| getPlatform | back to summary |
|---|---|
| public static String getPlatform() | |
| getPlatformSpecifcResourcePath | back to summary |
|---|---|
| public final String getPlatformSpecifcResourcePath()
Deprecated
| |
| getPlatformSpecifcResourcePath | back to summary |
|---|---|
| public final String getPlatformSpecifcResourcePath(String platform)
Deprecated
| |
| getPlatformSpecificResourcePath | back to summary |
|---|---|
| public final String getPlatformSpecificResourcePath() | |
| getPlatformSpecificResourcePath | back to summary |
|---|---|
| public final String getPlatformSpecificResourcePath(String platform) | |
| getResorucePath | back to summary |
|---|---|
| public final String getResorucePath()
Deprecated
| |
| getResourcePath | back to summary |
|---|---|
| public final String getResourcePath() | |
| getSpecificSearchDirs | back to summary |
|---|---|
| public final String[] getSpecificSearchDirs() Search directories for library:
| |
| load | back to summary |
|---|---|
| public synchronized void load() Load the native library. | |
| load | back to summary |
|---|---|
| private boolean load(ArrayList<Throwable> errors, File lib) | |
| loadLibrary | back to summary |
|---|---|
| private boolean loadLibrary(ArrayList<Throwable> errors, String lib) | |
| map | back to summary |
|---|---|
| private String map(String libName) | |
| version | back to summary |
|---|---|
| private static String version(Class<?> clazz) | |