title: Sending message to a running process
body: <p>I'd like to connect two programs and I'm stuck, Googled everything (probably I was doing something wrong) so now I'm turning to you.<br>
  So the structure is the following, the first one (let me call it <strong>ProgramA</strong>) and the second one (let me call it <strong>ProgramB</strong>) are different softwares with different tasks.</p>
  
  <p>The core of the problem is, I don't exactly know how to send a message to ProgramB via command line.<br>
  Actually I can execute <strong>ProgramB</strong> via <strong>ProgramA</strong> this way of course:</p>
  
  <pre><code>Runtime.getRuntime().exec("... ProgramB ...");
  </code></pre>
  
  <p>Forgot to mention that <strong>ProgramB</strong> also has a System.in reader.<br>
  How to <em>continuously</em> send messages to ProgramB with ProgramA, that's started from ProgramA and listens for more messages via command line?</p>
  
  <p><strong>For example:</strong> ProgramA -> ProgramB (Waiting for incoming messages)<br>
  What to do now to send something to a program that runs separately and is working like a command line?  </p>