Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is method Descriptor/signature for byte[] byte array using JNI?

My JAVA class code snippet. I want to access getReg_chal() method from my C file using JNI:

public byte[] getReg_chal() {
    return reg_chal;
}

My C file doing some jni operation:

mid = (*env)->GetMethodID(env, info, "getReg_chal()", "([B)V");

mid = (*env)->GetMethodID(env, info, "getReg_chal()", ***);

I want to know the method descriptor for my byte[]. Writing "({B)V" gives me method not found error. What would I fill in ***? Please help me. Thanks in advance.

like image 571
Rohan K Avatar asked Sep 16 '11 10:09

Rohan K


1 Answers

[B

http://download.oracle.com/javase/6/docs/technotes/guides/jni/spec/types.html#wp9502

like image 198
Pointer Null Avatar answered Sep 21 '22 12:09

Pointer Null