title: Java won't execute cmd line?
body: <p>I try to run this shell in  java but it never works. </p>
  
  <pre><code>Process p = Runtime.getRuntime().exec(" cat *.java|sed '/import/d'|sed'/package/d'&gt;&gt;b.java ");
  </code></pre>
  
  <p>When I change the cmd to something like "<code>ls</code>" or "<code>open foo.java</code>" the code will works.</p>
  
  <p>Any idea why?</p>