Java and C++ Shared Memory

后端 未结 2 501
情深已故
情深已故 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:42

    Yes, you can use code project :code project

    0 讨论(0)
  • 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.

    0 讨论(0)
提交回复
热议问题