FindClass fails after GetStaticFieldID failed

C

Christian Ziech

Hi,

it seems to me that I either run into a JNI-Bug or that I forgot a
thing. The situation is the following: I want to throw an Java-Exception
out of the C(++)-Code when a given field cannot be found during a method
call. When I throw the Java-Exception before I try to find the field
everything is fine and I get the exception. However if I do so after I
get NULL from GetStaticFieldID() the FindClass() call before
env->ThrowNew() fails to find the same class. Anyone with an Idea or did
I misunderstand something?

Thx in advance
Christian
 
C

Christian Ziech

Ok I found my silly mistake - env->ExceptionClear() was not always
executed after an exception occured ...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,681
Members
48,796
Latest member
Greg L.

Latest Threads

Top