Skip to main content
GameDev.net gamedev.net
🔒 Locked

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

Started by sdaq Feb 29, 2012 at 8:40 PM 1 replies 1.7k views
Original Post
sdaq
sdaq
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.
swiftcoder
swiftcoder
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]
sdaq
sdaq
thank you swiftcoder!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.