Java代碼是否有可能JNI函數返回整數或布爾值?
boolean b = invokeNativeFunction();
int i = invokeNativeFunction2();
C代碼
jboolean Java_com_any_dom_Eservice_invokeNativeFunction(JNIEnv* env, jobject obj) {
bool bb = 0;
...
return // how can return 'bb' at the end of the function?
}
jint Java_com_any_dom_Eservice_invokeNativeFunction2(JNIEnv* env, jobject obj) {
int rr = 0;
...
return // how can return 'rr' at the end of the function?
}
是否有可能JNI函數返回整數或布爾?如果是的話,我該怎麼做?