title: Java process inputstream in thread
body: <p>I develop an Eclipse plugin and I have a problem</p>
  
  <p>My code is the following one:</p>
  
  <pre><code>String run_pelda = "cmd.exe /C pelda.exe";
  Runtime pelda_rt = Runtime.getRuntime();
  Process pelda_proc = javacheckgen_rt.exec(run_pelda);
  </code></pre>
  
  <p>And after I would like to read the inputstream:</p>
  
  <pre><code>InputStream toolstr = tool_proc.getInputStream();
  InputStreamReader r = new InputStreamReader(toolstr);
  BufferedReader in = new BufferedReader(r);
  </code></pre>
  
  <p>But my new Eclipse instsnce freezes. I think I should do it in java threads, but unfortunatelly I don't know to use it correctly.</p>
  
  <p>Please give me some ideas!</p>