Jni FindClass Returns Null

One reason is the version of jvm.dll which contains JNI_CreateJavaVM is different from the version of the class file which is assigned to FindClass.

When FindClass returns null, we can check the reason like this:

1
2
3
if (env->ExceptionCheck()) {
    env->ExceptionDescribe();
}

refer to: https://blog.csdn.net/liu_12345_liu/article/details/131154935

Print signature of a Java function:

javap -s -private Sample2

refer to: https://blog.csdn.net/fuhanghang/article/details/122257507