I have a callback method in Java which is called by a native thread. One of the parameter of callback is an ArrayList object.
I am not able to get classref for ArrayList and its methods. Tried with "Ljava/util/ArrayList" but in vain. Please suggest a solution. thanks in advance
The class reference would be:
jclass cls = (*env)->FindClass(env, "java/util/ArrayList");
OR
jclass cls = (*env)->FindClass(env, "Ljava/util/ArrayList;");
You have an extra L
in front of the java/util/ArrayList
. In that case you also need to append a ;
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With