I found this comment by iirekm https://stackoverflow.com/a/3926392/733861 He says "If you need inter-process shared memory, use mapped files."
Can anyone give an example how to do that? I found this but it does not show inter-process communication. http://javarevisited.blogspot.in/2012/01/memorymapped-file-and-io-in-java.html