JNI_OnLoad
jint ret = 1;
for (auto& cls : classes) {
ret = 1;
jclass clazz2 = env->FindClass(cls.c_str());
if (clazz2) {
ret = env->RegisterNatives(clazz2,
method_table2,
sizeof(method_table2) / sizeof(method_table2[0]));
env->DeleteLocalRef(clazz2);
} else {
break;
}
}
return ret == 0 ? JNI_VERSION_1_6 : JNI_ERR;
Last updated
Was this helpful?