NMI Accessor Function Tables
 
 
 
 
 Primitive Types
Java Type Native Type Description
boolean jboolean unsigned 8 bits
byte jbyte signed 8 bits
char jchar unsigned 16 bits
short jshort signed 16 bits
int jint signed 32 bits
long jlong signed 64 bits
float jfloat 32 bits
double jdouble 64 bits
void void N/A
 
 

 
 
 
 
 Accessor Functions for Java Field Access
GetField Routine Name Native Type Java Type
GetObjectField() jobject Object
GetBooleanField() jboolean boolean
GetByteField() jbyte byte
GetCharField() jchar char
GetShortField() jshort short
GetIntField() jint int
GetLongField() jlong long
GetFloatField() jfloat float
GetDoubleField() jdouble double
 
 
 
 
 
Accessor Functions for Setting Java Field Values
SetField Routine Name Native Type Java Type
SetObjectField() jobject Object
SetBooleanField() jboolean boolean
SetByteField() jbyte byte
SetCharField() jchar char
SetShortField() jshort short
SetIntField() jint int
SetLongField() jlong long
SetFloatField() jfloat float
SetDoubleField() jdouble double
 
 
 
 
 
Accessor Functions to Invoke Java Methods from Native Methods
CallMethod Routine Name Native Type Java Type
CallVoidMethod() void void
CallObjectMethod() jobject Object
CallBooleanMethod() jboolean boolean
CallByteMethod() jbyte byte
CallCharMethod() jchar char
CallShortMethod() jshort short
CallIntMethod() jint int
CallLongMethod() jlong long
CallFloatMethod() jfloat float
CallDoubleMethod() jdouble double
 

 
 
 
 
 
Accessor Functions for Accessing Static Java Fields
GetStaticField Routine Name Native Type Java Type
GetStaticObjectField() jobject Object
GetStaticBooleanField() jboolean boolean
GetStaticByteField() jbyte byte
GetStaticCharField() jchar char
GetStaticShortField() jshort short
GetStaticIntField() jint int
GetStaticLongField() jlong long
GetStaticFloatField() jfloat float
GetStaticDoubleField() jdouble double
 
 
 
 
 
Accessor Functions for Setting Static Field Values
SetStaticField Routine Name Native Type Java Type
SetStaticObjectField() jobject Object
SetStaticBooleanField() jboolean boolean
SetStaticByteField() jbyte byte
SetStaticCharField() jchar char
SetStaticShortField() jshort short
SetStaticIntField() jint int
SetStaticLongField() jlong long
SetStaticFloatField() jfloat float
SetStaticDoubleField() jdouble double
 
 
 
 
 
 
 Accessor Functions for Invoking Static Java Methods
CallStaticMethod Routine Name Native Type Java Type
CallStaticVoidMethod() void void
CallStaticObjectMethod() jobject Object
CallStaticBooleanMethod() jboolean boolean
CalStaticByteMethod() jbyte byte
CallStaticCharMethod() jchar char
CallStaticShortMethod() jshort short
CalStaticIntMethod() jint int
CallStaticLongMethod() jlong long
CallStaticFloatMethod() jfloat float
 
 
 
 

 Java VM Type Signatures
 
Signature Java Type
Z boolean 
B byte
C char
S short
I int
J long
F float
D double
Lfully qualified class; fully qualified class
[ type type [ ]
 ( arg-types ) ret-type method type