Having problems running system commands from a java program:
<p>This is giving just the output of <code>ls</code>:</p>

<pre><code>String[] cmd={"bash","-c","ls","-l"}:  
ProcessBuilder pb=new ProcessBuilder(cmd);
</code></pre>

<p>Whereas this is giving long listing output properly:   </p>

<pre><code>String[] cmd={"bash","-c","ls -l"};
</code></pre>
