I have 2 applications, one written in C and the other in Java, that suppose to run on the same machine. What is the best way to implement an IPC between them?
best m
I've found that the simplest approach is to exec the native program from java, and then communicate via the process input and output streams. This only works for ASCII communication though, which in most cases is fine. This approach works across platforms. If the applications are launched independently of eachother, then files or sockets are both cross-platform approaches and will work with binary data if desired.
There's always JNI or JNA, but these are typically best suited to a tight couplin between java and native code.