GetVersion
jint GetVersion(JNIEnv *env);
Returns the version of the native method interface.
LINKAGE:
Index 4 in the JNIEnv interface function table.
PARAMETERS:
env
: the JNI interface pointer.RETURNS:
Returns the major version number in the higher 16 bits and the minor version number in the lower 16 bits.
In JDK/JRE 1.1,
GetVersion()
returns 0x00010001
.
In JDK/JRE 1.2,
GetVersion()
returns 0x00010002
.
In JDK/JRE 1.4,
GetVersion()
returns 0x00010004
.
In JDK/JRE 1.6,
GetVersion()
returns 0x00010006
.Constants
SINCE JDK/JRE 1.2:
#define JNI_VERSION_1_1 0x00010001 #define JNI_VERSION_1_2 0x00010002 /* Error codes */ #define JNI_EDETACHED (-2) /* thread detached from the VM */ #define JNI_EVERSION (-3) /* JNI version error
SINCE JDK/JRE 1.4:
#define JNI_VERSION_1_4 0x00010004
SINCE JDK/JRE 1.6:
#define JNI_VERSION_1_6 0x00010006