title: How to have 2 JVMs talk to one another
body: <p>I have the following situation:</p>
  
  <p>I have 2 JVM processes (really 2 <code>java</code> processes running separately, not 2 threads) running on a local machine. Let's call them <code>ProcessA</code> an <code>ProcessB</code>.</p>
  
  <p>I want them to communicate (exchange data) with one another (e.g. <code>ProcessA</code> sends a message to <code>ProcessB</code> to do something).</p>
  
  <p>Now, I work around this issue by writing a temporary file and these process periodically scan this file to get message. I think this solution is not so good.</p>
  
  <p>What would be a better alternative to achieve what I want?</p>