title: Writing command line output to a file with in Java
body: <p>I am running a command line command from java:</p>
  
  <pre><code>ping localhost &gt; output.txt
  </code></pre>
  
  <p>The command is send via a Java like this: </p>
  
  <pre><code>Process pr = rt.exec(command);
  </code></pre>
  
  <p>For some reason the file is not created, but when i run this command from the
  command line itself, the file does create and the output is in that file.</p>
  
  <p>Why doesn't the java command create the file?</p>