How can i make an excisting c-file native? very urgent
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   nick_moesen
Posted On:   Wednesday, November 26, 2003 03:41 AM

Hey,
I'm doing my thesis in Vigo Spain. We need to use JNI to be able to use v4l in a java program.
Is it possible to make a complete c file native with JNI?

It has C classes like :

int video_open(video_t *vid, int width, int height, const char *path, int *image_size)

and more like this. Is it possible? and how?
thanks in advance


nick

Re: How can i make an excisting c-file native? very urgent

Posted By:   Ganesh_Iyer  
Posted On:   Wednesday, December 3, 2003 05:20 PM

I dont think there is any automatic way to convert functions in a c file to jni. I would suggest u to simply write a java wrapper. Declare native functions in the java class that correspond to ur c fcuntions.
Use javah to generate corresponding wrappers in c.

I dont see any way other than this,.
About | Sitemap | Contact