• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java GUI calling C++ dll and shared lib

 
Marcel Wentink
Ranch Hand
Posts: 157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What would be the best way to call a dll (on windows) or a shared library (on unix) from a java gui program.

We want to port a program which has calculation functions written in C++ and a small GUI in Delphi to other operating systems. One of the options would be, rewrite the GUI in Java, and let java call the native C++ code.

I was thinking of JNI, but I do not know if there are other options. I know that we also could use other tools like Qt, Mono and Lazarus, but that's not my task. I am investigating in Java is an options.

Thanks in advance for any advice.
 
Rob Spoor
Sheriff
Pie
Posts: 20611
63
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since it's a library and not a whole program, JNI (or JNA which basically is JNI but then written in Java) is the only way I think.

Either that, or write the GUI in C(++). Qt can be used, but GTK+ (with gtkmm being the C++ version) is also quite good.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic