title: Runtime's exec() method is not redirecting the output
body: <pre><code>Process p = Runtime.getRuntime().exec("sh somescript.sh &amp;&gt; out.txt");
  </code></pre>
  
  <p>I am running this command using Java.  The script is running but it's not redirecting its stream to the file.  Moreover, the file <code>out.txt</code> is not getting created.</p>
  
  <p>This script runs fine if I run it on shell.</p>
  
  <p>Any ideas?</p>