I am writing a Web Crawler program and the GUI is written in Java. I am having trouble figuring out a way to call C++ from the GUI. I have text fields where the user can specify a search query and a starting URL in order to search. The GUI then needs to send that data to C++ as strings. I cannot figure out any system calls or whatever I need in order to call my C++ program. Any help would be greatly appreciated. Thanks in advance.
Yes, JNI is the way to call C++ (or C) from Java. Search java.sun.com Web site for information and tutorials.
Most tutorial information tends to be about using C. You can write your C++ in a C-like way, and it will work fine. But do search out the C++-specific features of JNI, because they make things a bit tidier.
Typically, you will not be able to call your existing C++ code directly from Java. It is usual to end up writing a C++ wrapper around your existing C++ code, to give it a JNI-compatible interface.
Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.