Appendices
JNI uses several natively defined C types that map to Java types. These types can be divided into two categories: primitive types and pseudo-classes. The pseudo-classes are implemented as structures in C, but they are real classes in C++.
The Java primitive types map directly to C platform-dependent types, as shown here:
The C type jarray represents a generic array. In C,
all of the array types are really just type synonyms of jobject. In C++, however, all of the array types inherit from jarray, which in turn inherits from jobject. The following table shows how the Java array types map to JNI C array types.
Here is an object tree that shows how the JNI pseudo-classes are related.
Appendix B: JNI method signature encoding
Native Java method parameter types are rendered, or mangled, into native code using the encoding specified in the table below.
Notes:
- The semicolon at the end of the class type L expression is the
terminator of the type expression, not a separator between expressions.
- You must use a forward slash (/) instead of a dot (.) to separate the
package and class name. To specify an array type use an open bracket ([).
For example, the Java method:
boolean print(String[] parms, int n)
has the following mangled signature:([Ljava/lang/Sting;I)Z

