Condividi tramite


JavaSystem.LoadLibrary(String) Method

Definition

Loads the native library specified by the libname argument.

[Android.Runtime.Register("loadLibrary", "(Ljava/lang/String;)V", "")]
public static void LoadLibrary (string libname);
[<Android.Runtime.Register("loadLibrary", "(Ljava/lang/String;)V", "")>]
static member LoadLibrary : string -> unit

Parameters

libname
String

the name of the library.

Attributes

Exceptions

if the library could not be loaded.

Remarks

Loads the native library specified by the libname argument. The libname argument must not contain any platform specific prefix, file extension or path. If a native library called libname is statically linked with the VM, then the JNI_OnLoad_libname function exported by the library is invoked. See the JNI Specification for more details.

Otherwise, the libname argument is loaded from a system library location and mapped to a native library image in an implementation- dependent manner.

The call System.loadLibrary(name) is effectively equivalent to the call <blockquote>

Runtime.getRuntime().loadLibrary(name)

</blockquote>

Java documentation for java.lang.System.loadLibrary(java.lang.String).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to