Package org.conscrypt
Class NativeCryptoJni
java.lang.Object
org.conscrypt.NativeCryptoJni
Helper to initialize the JNI libraries. This version runs when compiled as part of a host OpenJDK
build.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final class
Sorts the errors in a list in descending order of value. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static String
archName()
private static ClassLoader
(package private) static void
init()
Attempts to load the shared JNI library.private static void
logResults
(List<NativeLibraryLoader.LoadResult> results) private static String
osName()
private static String
private static void
throwBestError
(List<NativeLibraryLoader.LoadResult> results)
-
Field Details
-
STATIC_LIB_NAME
- See Also:
-
DYNAMIC_LIB_NAME_PREFIX
- See Also:
-
-
Constructor Details
-
NativeCryptoJni
private NativeCryptoJni()
-
-
Method Details
-
init
Attempts to load the shared JNI library. First try loading the platform-specific library name (e.g. conscrypt_openjdk_jni-linux-x86_64). If that doesn't work, try to load the library via just the prefix (e.g. conscrypt_openjdk_jni). If not found, try the static library name. The non-suffixed dynamic library name is used by the Android build system, which builds the appropriate library for the system it's being run on under that name. The static library name is needed in order to support Java 8 static linking (http://openjdk.java.net/jeps/178), where the library name is used to invoke a library-specific load method (i.e.JNI_OnLoad_conscrypt
).- Throws:
UnsatisfiedLinkError
- if the library failed to load.
-
logResults
-
throwBestError
-
classLoader
-
platformLibName
-
osName
-
archName
-