dcsimg
Calling a method from an existing C++ class from Java using JNI?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Chandra_Mouli
Posted On:   Monday, July 15, 2002 11:14 PM

I have an existing C++ application.

I want to desigen the java front end of that application. One way is to use JNI. But the problem is I dont want to change my C++ code.

Is there any way I can do it with JNI without changing an existing C++ code ?

Re: Calling a method from an existing C++ class from Java using JNI?

Posted By:   Alexander_Krapf  
Posted On:   Tuesday, July 23, 2002 04:55 PM

Chandra,


The exact answer depends a lot on your application, but it sounds like a perfect usecase for our JunC++ion tool. JunC++ion generates C++ proxy classes from Java classes, effectively making the C++ application Java aware.


In your usecase, you could design and implement the GUI in Java and generate C++ proxy classes for your custom dialogs, windows, Swing classes, etc. Then you would call up these UI elements from your C++ code.


It works very nicely because JunC++ion supports callbacks, allowing you to react to events (like ActionEvent or WindowEvent) in C++.


Regards,


Alex

About | Sitemap | Contact