JNI Type signatures

For my future reference, one of the things that will show up when you’re debugging your java stuff are functions with signatures.

The official documentation is here: http://docs.oracle.com/javase/6/docs/technotes/guides/jni/spec/types.html#wp16432

But for quicker access, here’s what matters:

Type Signature

Java 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

For example, the Java method:

long f (int n, String s, int[] arr); 

has the following type signature:

(ILjava/lang/String;[I)J 

 

Leave a Reply