Start of Tutorial > Start of Trail |
Search
Feedback Form |
Congratulations! You have learned a great deal about the JNI. To help you remember everything you have learned, this section summarizes the JNI functions and mapping types.
The following two tables summarize how Java types map to native types and the rules for encoding Java types in native signatures.
Primitive Types and Native Equivalents
Java Type Native Type Size in bits boolean
jboolean
8, unsigned byte
jbyte
8 char
jchar
16, unsigned short
jshort
16 int
jint
32 long
jlong
64 float
jfloat
32 double
jdouble
64 void
void
n/a
Signature | Java Programming Language Type | Z | boolean |
B | byte |
C | char |
S | short |
I | int |
J | long |
F | float |
D | double |
L fully-qualified-class ; | fully-qualified-class | [ type | type[] |
( arg-types ) ret-type | method type |
GetStringChars
GetArrayLength
GetObjectClass
GetFieldID
ExceptionClear
NewGlobalRef
MonitorEnter
Start of Tutorial > Start of Trail |
Search
Feedback Form |
Copyright 1995-2001 Sun Microsystems, Inc. All rights reserved.