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
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.