Weird Error JAVA process execution
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/2460297/run-shell-command-from-java">run shell command from java</a>  </p>
</blockquote>



<p>I'm trying to run a process with some arguments from inside Java and before running the particular command I print it using <code>println</code>. </p>

<p>Now the problem is from inside Java, the process is not doing good.. its sending some error on the Error Stream instead of output. But If I run the same command printed by Java on screen in console, it works perfectly. </p>

<pre><code>String command="abc -def -hhij";
System.out.println(command);
Process p = Runtime.getRuntime.exec(command);
</code></pre>

<p>Anyone know whats going on wrong?</p>
