From Java can i pass a signal to C..

G

ganeshamutha

Hi all,

i need some suggestion.... could u please tell me how can i pass
a signal (for example, by the button click) from java to C . (C added
with java through JNI thread)..

Thanks in Advance,
Ganesh.
 
G

Gordon Beaton

i need some suggestion.... could u please tell me how can i pass a
signal (for example, by the button click) from java to C . (C added
with java through JNI thread)..

Are you asking how to do "button clicks", or how to do JNI?

For the former, read about event handling in the Swing tutorial.

For the latter, realize that there is no functional difference between
pure Java methods and native methods. Wherever you can invoke a Java
method, you can invoke a native method instead.

Define a class that implements ActionListener. Call a C method from
the actionPerformed() method. Or declare a native actionPerformed()
and implement it in C.

/gordon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,793
Messages
2,569,640
Members
45,353
Latest member
RogerDoger

Latest Threads

Top