 <p>You are trying to execute a batch file from a network share. The operation probably hangs due to networking issues, even when executed from the command line. A variant hypothesis is that the command expects user input, such as credentials for the network share. There may be conditions under which this behavior is exhibited only when run through Java.</p> <p>To gain more insight into the happenings I suggest printing out each character you manage to read (followed by <code>System.out.flush()</code>), as well as merging the standard output and error into a single stream observed within Java. Refer to the documentation of <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/ProcessBuilder.html#redirectErrorStream()" rel="nofollow"><code>ProcessBuilder</code></a> to find out how to achieve that.</p>