JNI FindClass java.lang.ClassNotFoundException -


I am currently writing some JNI code to call a class within my JAVA program. I have successfully done it in a steady way within a class already.

Currently, when I use it:

  jclass proc_jclass = env-> FindClass ("Example / io / struct / JavaClass");  

This crashes JVM:

  java.lang.ClassNotFoundException. & Lt; Init & gt; (Ljava / lang / String;) V + 3  

I have already tried to define class path locations, there is no benefit.

Thanks

I got the answer. This issue was resolved by moving the FindClass directly down the JNIEXPORT method. As IllGarly has said that NV pointer may be due to modified. It was removed in this way, the way it was avoided. Given the code it is still unclear what the problem is, but when I came to know that the sick report has come back. Apart from this, the top tip uses a variable I.e:

  env-> FindClass (str_class);  

Str_class was used to define squared paths so that you can quickly test what is accessible without combining classes again. - I know it clearly, but saves time while debugging.


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -