in cross-platform-scale-2015-demo/android/cxx/Hello.cpp [20:35]
JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) {
JNIEnv* env(nullptr);
if (JNI_OK != vm->GetEnv(reinterpret_cast<void**>(&env), JNI_VERSION_1_6)) {
return JNI_ERR;
}
jclass helloClass = env->FindClass("com/facebook/buck/demo/Hello");
JNINativeMethod methods[] = {
{ "getHelloString", "()Ljava/lang/String;", (void*) getHelloString },
};
if (JNI_OK != env->RegisterNatives(helloClass, methods, std::extent<decltype(methods)>::value)) {
return JNI_ERR;
}
return JNI_VERSION_1_6;
}