Group PJ_JNI

group PJ_JNI

Functionalities specific to JNI. Currently only implemented on Android OS, but may be extended to other platforms in the future.

Functions

void pj_jni_set_jvm(void *jvm)

Set the Java Virtual Machine environment variable. Note that applications typically do not need to call this function unless PJ_JNI_HAS_JNI_ONLOAD is disabled.

Parameters:

jvm – The Java Virtual Machine environment.

pj_bool_t pj_jni_attach_jvm(void **jni_env)

Attach the current thread to a Java Virtual Machine.

Parameters:

jni_env – Output parameter to store the JNI interface pointer.

Returns:

PJ_TRUE if the attachment is successful, PJ_FALSE if otherwise.

void pj_jni_detach_jvm(pj_bool_t attached)

Detach the current thread from a Java Virtual Machine.

Parameters:

attached – Specify whether the current thread is attached to a JVM.