Shared memory between C++ and Java processes

前端 未结 2 1295
时光取名叫无心
时光取名叫无心 2020-12-08 15:55

My aim is to pass data from a C++ process to a Java process and then to receive a result back.

I have achieved this via a named pipe but I would prefer to share the

2条回答
  •  醉梦人生
    2020-12-08 16:28

    Have you considered using 0MQ it supports both Java and C++ and will be more reliable. I think if you want to do shared memory in Java it would have to be via JNI, last time I looked there was not other way to do it.

    This shows you have to do it via JNI if you go that route. Although the solutions I have found are Windows specific which may not apply to you.

提交回复
热议问题