Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / December 2005

Tip: Looking for answers? Try searching our database.

JNI & C & Events

Thread view: 
ginjasvinja - 12 Dec 2005 15:00 GMT
Hi everyone! I wrote some java code using JNI and also dll for it in C.
Everything worked fine untill I got a job to generate some events. I
have to generate some event in C like "key down", then to call Java
function to react like print some text. I followed the Desktop
Indicator example but could not do anything usefull. I think I don't
understand that example as well. Does anyone have some similar example?
I'll be gratefull for any help or advice.
Roedy Green - 12 Dec 2005 21:24 GMT
>I got a job to generate some events. I
>have to generate some event in C like "key down", then to call Java
>function to react like print some text.

C can call Java.  C might call a Java method to create the synthetic
event and enqueue it or it might call the event handler directly.

see http://mindprod.com/jgloss/event11.html
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

ginjasvinja - 14 Dec 2005 07:33 GMT
I am not sure that I illustrated my problem as well. I have to call
native method to register event. In C I have to create window that will
register my event. When created window notice the event I have to call
Java function which can be only one line, like:
         System.out.println("Key down\n");
So the most of work I have to do in C. The Desktop Indicator example
does something like that but I think I need some simpler example.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.