JNI Help
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Sreenivasulu_Gali
Posted On:   Wednesday, December 12, 2001 07:20 AM

Hi,

I have written jni application which is working fine and i am able to call java method from the c function which is generated by javah tool.


But i want to call
java method from userdefined c function??

Can any one help me in this regard...
It's urgent for my project...

Thanks advance
bye
Srini

Re: JNI Help

Posted By:   Sridhar_Koritala  
Posted On:   Tuesday, December 18, 2001 09:09 PM

That's very simple....
First you have to get the class definition from JENV,
then get the API ID.
call the method using callMethod(...)
type = the data type the JAVA API would return...

Please look into more details of JENV
JCLs and JOBJ apis.

Re: JNI Help

Posted By:   Christophe_Dore  
Posted On:   Thursday, December 13, 2001 04:27 AM

take a look at function in the JNIEnv struct like
getMethodID to grab "method pointers"

and CallxxxMethod to call methods, that use
the methodIDs mentionned above.
About | Sitemap | Contact