Click to See Complete Forum and Search --> : connecting java and c


rani_techie
February 21st, 2008, 05:49 PM
Hello All,
One of my co worker in the company is having a wierd problem. He has a gui which is implemented in java. Where he has a text box in which user has to give some input. Now he has to retrieve this value from the text box using a c program because the firmware supports c language. So, how can we do that in c .. .is there any interface that connects java gui and c together ??? or suggest any other way of dealing things like this..


any input is appreciated...

thanks,
Rani

Lindley
February 21st, 2008, 05:52 PM
It's certainly possible; CORBA can do it (but is probably overkill in this case).

The simplest thing may be to spawn the GUI from the C program as a separate process, and communicate with it via pipes.

rani_techie
February 21st, 2008, 05:57 PM
Let me understand what u mean...

create a thread in c which would separately interact with java program with the help of corba. ryt ??

Paul McKenzie
February 21st, 2008, 06:08 PM
Hello All,
One of my co worker in the company is having a wierd problem. He has a gui which is implemented in java. Where he has a text box in which user has to give some input. Now he has to retrieve this value from the text box using a c programWhy must the value be retrieved from the textbox directly in C? Why can't the Java program read the value entered in the textbox, and then send that value to a C module?

In this case, use JNI.

Regards,

Paul McKenzie