How do I get my Java GUI to use a C++ library?

Started by
1 comment, last by sdaq 12 years, 1 month ago
hi all,

looking for ideas on how to do this... we have a Java GUI that needs to be able to make some function calls to a C++ library. Any help would be appreciated!

Thanks.
Advertisement
The low-level route is to write a JNI wrapper for your library, though this is a lot of work.

Somewhat simpler is to generate Java bindings using a generator like SWIG.

Another option is to wrap your library up in a small executable process, and communicate between the Java and C++ processes via Sockets/Pipes/etc. (sort of like Chrome's multi-process model).

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

thank you swiftcoder!

This topic is closed to new replies.

Advertisement