Running external program
<p>What's the difference between running programs using java and run it using the command line? In the first case it does not work, but in the second case it works fine.</p>

<p>Java:</p>

<pre><code>try {
    Runtime runtime = Runtime.getRuntime();
    Process proc = runtime.exec("../../../my/prog \"//10.124.12.15/C:/output/*\" ../../../input/345 -N -A");
    DataInputStream bis = new DataInputStream(proc.getInputStream());
    int _byte;
    while ((_byte = bis.read()) != -1)
        System.out.print((char)_byte);
    proc.waitFor();
} catch (IOException ex) {
    ex.printStackTrace();
} catch (InterruptedException ex) {
    ex.printStackTrace();
}
</code></pre>

<p>AND command:</p>

<pre><code>../../../my/prog "//10.124.12.15/C:/output/*" ../../../input/345 -N -A
</code></pre>
