Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Java (http://www.velocityreviews.com/forums/f30-java.html)
-   -   From Java can i pass a signal to C.. (http://www.velocityreviews.com/forums/t389585-from-java-can-i-pass-a-signal-to-c.html)

ganeshamutha@gmail.com 12-21-2006 12:14 PM

From Java can i pass a signal to C..
 
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.


Gordon Beaton 12-21-2006 12:58 PM

Re: From Java can i pass a signal to C..
 
On 21 Dec 2006 04:14:36 -0800, ganeshamutha@gmail.com wrote:
> 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

--
[ don't email me support questions or followups ]
g o r d o n + n e w s @ b a l d e r 1 3 . s e


All times are GMT. The time now is 05:37 AM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57