简体   繁体   中英

C++ GUI in Java SWT

I developed a GUI application in C++. This GUI contains objects that belongs to external libraries for drawing.

What I need is to "import" this GUI into an other GUI made with Java (Eclipse). I mean I need to show this C++ GUI in a Java application.

Is this possible?

The easiest solution is to launch the native application from Java. That doesn't sound like what you want to do, though.

The second easiest is make your native app a library and interact with it from Java using JNI , or JNA (if you don't care about performance so much). See here . You'd redo your interface in Java (or perhaps there is a way to embed Win32 or whatever GUI framework in it, I don't know).

Also take a look at SWIG .

The hardest method would be embedding a JVM in your native application.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM