| Method and Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| io.humble.ferry.JNILibraryLoader.loadLibrary(String, Long)
Use
JNILibrary instead.
Attempts to find and load the given library, with the given version of the
library if version is asked for.
First, if we detect that we've already loaded the given library, we'll just return rather than attempt a second load (which will fail on some OSes). If we haven't already loaded this library, we will search in the path defined by the property java.library.path for the library, creating OS-dependent names, and using version strings. If we can't find it in that property, we'll search through the OS-dependent shared-library specification environment variable. If we can't find a versioned library (and one was requested) but can find an unversioned library, we'll use the unversioned library. But we will first search all directories for a versioned library under the assumption that if you asked for a version, you care more about meeting that requirement than finding it in the first directory we run across.
If all that still fails, we'll fall back to the
We assume a libtool-like library name for the shared library, but will check for common variants on that name. Hopefully an illustration will make this all clearer. Assume we're looking for a library named "foo" with version 1, this method will search as follows:
|
Copyright © 2018 Humble Software. All rights reserved.