Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

FindClass(JNIEnv *e, const char *classname)

843829Mar 16 2003 — edited Mar 27 2003
Hi there,

When calling upon the JNI method
 jclass FindClass(JNIEnv  *e, const char  *classname) 
i am getting a null-reference as returned value. I am however sure that the class of which i pass the name as second argument (e.g. "Car"), and the threadpointer *e are correct. What is more is that i am also sure that the class in question is loaded at the time i call upon FindClass (i make the call in a profiler agent and through listening to class loading events, i am sure it is effectively loaded).

I have already tried to set the classpath when running the application, since that is where the jvm looks for the class with name classname, but it was no use... it kept returning null, instead of the correct jclass reference it should return.

Can anyone help me with this problem?

Thank you very much!
doubleu007
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 24 2003
Added on Mar 16 2003
6 comments
383 views