Primitive type mappings

The JNI compiler maps Java primitive types to the JNI-equivalent C++ types:

Java type

JNI-equivalent C++ type

boolean

jboolean

byte

jbyte

char

jchar

double

jdouble

float

jfloat

int

jint

long

jlong

short

jshort

Arrays of Java primitive types are mapped to proxy classes in the java_lang_Object.hpp header file, as follows:

Java type

C++ type

C++ type with namespaces

boolean[]

java_booleanArray

java::booleanArray

byte[]

java_byteArray

java_byteArray

char[]

java_charArray

java_charArray

double[]

java_doubleArray

java_doubleArray

float[]

java_floatArray

java_floatArray

int[]

java_intArray

java_intArray

long[]

java_longArray

java_longArray

short[]

java_shortArray

java_shortArray

The Java null type is mapped to the java_null proxy class; java::null with namespaces.