How do i throw an Exception from C/C++ JNI code?

Davanum Srinivas

Use ThrowNew as shown below:

jclass exc = env->FindClass("java/lang/NullPointerException");
if (exc != NULL)
    env->ThrowNew(exc, "(in C++ code)");
0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact