public class Library extends Object
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)| Constructor and Description |
|---|
Library(String name) |
Library(String name,
Class<?> clazz) |
Library(String name,
String version) |
Library(String name,
String version,
ClassLoader classLoader) |
| Modifier and Type | Method and Description |
|---|---|
String |
getArchSpecifcResourcePath()
Deprecated.
|
String |
getArchSpecificResourcePath() |
static int |
getBitModel() |
String |
getLibraryFileName() |
String |
getNativeLibraryPath()
Get the path to the native library loaded.
|
URL |
getNativeLibrarySourceUrl()
Get the URL to the native library source that has been extracted (if it was extracted).
|
static String |
getOperatingSystem() |
String |
getOperatingSystemSpecifcResourcePath()
Deprecated.
|
String |
getOperatingSystemSpecificResourcePath() |
static String |
getPlatform() |
String |
getPlatformSpecifcResourcePath()
Deprecated.
|
String |
getPlatformSpecifcResourcePath(String platform)
Deprecated.
|
String |
getPlatformSpecificResourcePath() |
String |
getPlatformSpecificResourcePath(String platform) |
String |
getResorucePath()
Deprecated.
|
String |
getResourcePath() |
String[] |
getSpecificSearchDirs()
Search directories for library:
${platform}/${arch} to enable platform JNI library for different processor archs
${platform} to enable platform JNI library
${os} to enable OS JNI library
no directory
|
void |
load()
Load the native library.
|
public Library(String name, String version, ClassLoader classLoader)
public String getNativeLibraryPath()
public URL getNativeLibrarySourceUrl()
public static String getOperatingSystem()
public static String getPlatform()
public static int getBitModel()
public void load()
@Deprecated public final String getArchSpecifcResourcePath()
public final String getArchSpecificResourcePath()
@Deprecated public final String getOperatingSystemSpecifcResourcePath()
public final String getOperatingSystemSpecificResourcePath()
@Deprecated public final String getPlatformSpecifcResourcePath()
public final String getPlatformSpecificResourcePath()
@Deprecated public final String getPlatformSpecifcResourcePath(String platform)
public final String getPlatformSpecificResourcePath(String platform)
@Deprecated public final String getResorucePath()
public final String getResourcePath()
public final String getLibraryFileName()
public final String[] getSpecificSearchDirs()
${platform}/${arch} to enable platform JNI library for different processor archs${platform} to enable platform JNI library${os} to enable OS JNI libraryCopyright © 2009–2018 FuseSource, Corp.. All rights reserved.