Reputation: 1
If im using this:
if(!env->FindClass("com/test/app")){
Log("Not found");
return 0;
}
I got error: no such class
Upvotes: 0
Views: 440
Reputation: 58427
As mentioned in the documentation, FindClass
can result in a variety of (Java) exceptions being thrown.
It is an error to make any further JNI calls with a pending Java exception. So you need to, at a minimum, clear the exception using env->ExceptionClear()
.
Upvotes: 1