How do I send a pointer to array from JNI C code to a Java code ? For example :
JNI C Code :
jclass cls = (*env)->GetObjectClass(env,obj);
jmethodID mid = (*env)->GetMethodID(env,cls,"print"," ?? "); // What should be the signature here ?
jvalue a1,*arr;
a1.i = 2002;
a1.f = 12.90;
a1.c = 's';
a1.j = 344554;
a1.b = TRUE;
arr = &a1;
(*env)->CallVoidMethodA(env,obj,mid,arr);
Java Func :
public void print(?????) { // what should be the argument here ?
// add code here
}
How should the java function look like to receive a pointer to an array ?
CallVoidMethodA()instead of the more easyCallVoidMethod()?