Java and C++ Shared Memory

后端 未结 2 502
情深已故
情深已故 2020-12-17 20:58

I have a C++ piece of code that creates shared memory. Is it possible to write Java Code which can read the memory created by the C++ code unless using JNI. By the way I am

2条回答
  •  执念已碎
    2020-12-17 21:46

    See MappedByteBuffer. It's the standard Java class to read & write shared memory. I use it a lot. Yes, you can use this to communicate with any program written in any language which uses shared memory, and it's all very standard Java, no JNI.

提交回复
热议问题