dcsimg
How to Expose a C function to JAva?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Sundarraj_Mohanraj
Posted On:   Thursday, June 21, 2007 03:07 AM

Hi all,
Suppose if i have a function like " double testfun(int a, struct STR_Var *var, int **b,float *c, string) " in C Language, then How to i expose that function into JAva. We all know that Passing pointer to and from java is not possible, then Wjat is procedure to Expose that function to Java....

please give me the full description...

regards,
Mohan

Re: How to Expose a C function to JAva?

Posted By:   Robert_Lybarger  
Posted On:   Thursday, June 21, 2007 09:00 AM

Have you bothered to read through Sun's online Java/JNI tutorial yet? Looks like they took the tutorial offline, but scroll down the page and find the download link for the old JNI tutorial. Read through that first. You'll have to create a little bit of "bridge" code in C that talks to the JVM environment and handles translations of java types to C types (and back).
About | Sitemap | Contact