IPC between Java and C applications

前端 未结 4 1383
傲寒
傲寒 2021-01-20 08:33

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

4条回答
  •  野性不改
    2021-01-20 09:06

    I have never tried it, but Java does have support for memory mapped files http://docs.oracle.com/javase/1.4.2/docs/api/java/nio/MappedByteBuffer.html which would give you ability to share objects between C and Java apps. Synchronizing access might be challenging because I don't think Java has direct access to OS-level IPC synchronization primitives.

提交回复
热议问题