FindClassjclass FindClass(JNIEnv *env, const char *name);This function loads a locally-defined class. It searches the directories and zip files specified by the CLASSPATH environment variable for the class with the specified name. LINKAGE:Index 6 in the JNIEnv interface function table.PARAMETERS:env: the JNI interface pointer.name: a fully-qualified class name (that is, a package name, delimited by “/”, followed by the class name). If the name begins with “[“ (the array signature character), it returns an array class. The string is encoded in modified UTF-8. 看上边,要以"/"分隔而不是"."
LINKAGE:Index 6 in the JNIEnv interface function table.PARAMETERS:env: the JNI interface pointer.name: a fully-qualified class name (that is, a package name, delimited by “/”, followed by the class name). If the name begins with “[“ (the array signature character), it returns an array class. The string is encoded in modified UTF-8.
看上边,要以"/"分隔而不是"."
return functions->FindClass(this, name);这个name指的是绝对路径还是什么??为什么就找不到呢? 我们一起看吧!
test是一个类