|
|
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 booleanjboolean8, unsigned bytejbyte8 charjchar16, unsigned shortjshort16 intjint32 longjlong64 floatjfloat32 doublejdouble64 voidvoidn/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 ExceptionClearNewGlobalRefMonitorEnter|
|
Start of Tutorial > Start of Trail |
Search
Feedback Form |
Copyright 1995-2004 Sun Microsystems, Inc. All rights reserved.