Originally posted by Deep Narsay:
Correct, that is the best solution.
You can't be sure of that. Communication between C code and Java code can be done by having them running in two different processes, as you suggest. But it can also be done with them running in the same process, and calling each other directly, via JNI and the Invocation Interface. Performance and architectural considerations will tell you which way to do it, for a specific application. In this case, there's been no such discussion, so the correct solution is not known.
If you do want inter-process communication, you could use CORBA. The transport happens over sockets (probably), but you save having to write the code for creating/deciphering messages. Java and CORBA play nicely together. C++ and CORBA isn't too bad.
For completeness, I should say that you could have your C and your Java code in the same process, but different threads, and they could communicate via sockets or CORBA.
[ November 03, 2005: Message edited by: Peter Chase ]