Reputation: 730
Can I pass a primitive from Java to my C++ function using JNI function calls and modify its value in the C++ function ?
So far, I have seen examples of returning jstring,jint,jboolean etc, which I do not want to do. The other option that I know about is to get the ID of the primitive variable within C++ and set its value.
For Example :
JNIEXPORT void JNICALL Java_myFunction
(JNIEnv *, jobject obj, jboolean retJava)
Here i am passing boolean from java and want to change it in C++ depending on my computation without return statement.
Upvotes: 0
Views: 69