 <p>In your short batch file, the solution works because the Java command is opened in another command line in which the I/O are plugged in the Java application.<br> In your new batch, using start /b you open the Java application without a command-line and therefore without an I/O.<br> I'm not well-versed enough in batch to answer your question but what you need is to find how to redirect commands I/O, that is have control over the input (and possibly output, but it's irrelevant here) of the Java command.</p> <p>Looks like <a href="https://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/redirection.mspx?mfr=true" rel="nofollow">this</a> is a good start.</p>