title: Java, system command fails to run
body: <p>I'm trying to run a system command to extract a tar.bz2 file to a specified directory. This is the code:</p>
  
  <pre><code>ProcessBuilder myProc = new ProcessBuilder("tar", "-xjf", "/path/to/MyTarFile.tar.bz2"); 
  myProc.directory(new File("/directory/i/want/results/in/"));
  myProc.start();
  System.out.println(myProc.command());
  </code></pre>
  
  <p>It runs without error, however the file is deleted and not extracted anywhere. </p>
  
  <p>Any help would be greatly appreciated. </p>