I am trying to return an array from C program to Java, but it returns me the error "incompatible pointer to integer conversion returning 'int *' from a function with result type 'jint' (aka 'int'); dereference with * [-Wint-conversion]"
What I want to achieve is to use the array returned by this in a java program. Can someone please give an example on how I can do this.
JNIEXPORT jint JNICALL Java_com_ControlStub_alg1Value
(JNIEnv *env, jobject jobj) {
return 3212;
}
For example am using the above and using this function to just display its value in Java , similarly I need it to return an array. As am new to Java I am finding it difficult to do this , please help me. Thanks in advance!
Edit1: I already checked this link, but its confusing me as I said am still new to Java.