Package com.chilkatsoft.chilkat2
Class Chilkat2Native
java.lang.Object
com.chilkatsoft.chilkat2.Chilkat2Native
Loads the native library (
chilkat2java) once per JVM. The order is:
- the directory named by the system property
chilkat2.library.path, if set; - the classpath resource
/com/chilkatsoft/chilkat2/native/<platform>/<library>(an application that bundles the library in its own jar), extracted to~/.chilkat2/<version>/<platform>/(orjava.io.tmpdir, or the directory named bychilkat2.extract.dir) and loaded from there; System.loadLibrary("chilkat2java"):java.library.path.
windows-x86, windows-x86_64, windows-aarch64, linux-x86_64,
linux-aarch64, linux-armv7, linux-musl-x86_64, linux-musl-aarch64,
macos-x86_64, macos-aarch64.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic voidLoads the native library if it is not loaded yet.static StringWhere the native library was loaded from (nullbeforeensureLoaded()).static booleanWhether the running JVM is on Windows (the Windows-only classes check this).static Stringplatform()The platform string of the running JVM: the directory name of a bundled library (/com/chilkatsoft/chilkat2/native/<platform>/) and of the extraction directory.
-
Field Details
-
VERSION
The Chilkat version this jar was generated for.- See Also:
- Constant Field Values
-
-
Method Details
-
ensureLoaded
public static void ensureLoaded()Loads the native library if it is not loaded yet. Every Chilkat2 class calls this from its static initializer; applications may call it early to surface a loading problem at startup.- Throws:
UnsatisfiedLinkError- if no library could be loaded; the message lists where it looked
-
getLoadedFrom
Where the native library was loaded from (nullbeforeensureLoaded()).- Returns:
- a file path or
"java.library.path"
-
platform
The platform string of the running JVM: the directory name of a bundled library (/com/chilkatsoft/chilkat2/native/<platform>/) and of the extraction directory.- Returns:
<os>-<arch>, withlinux-musl-for Alpine
-
isWindows
public static boolean isWindows()Whether the running JVM is on Windows (the Windows-only classes check this).- Returns:
- true on Windows
-