I have a C program that invokes a java program but I have a problem: my java program returns an int [], how can I use JNI to get the result of it in C, since JNI only has CallIntMethod?
Arrays are objects, so you can use CallObjectMethod(). Use GetIntArrayElements() to access the array elements.
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