I'm invoking the execution of a BAT file from Java with the Runtime object.
Is it possible to hide the BAT window during the execution of the script? How is it possible?
Try using javaw rather than java to run the script.
http://docs.oracle.com/javase/1.4.2/docs/tooldocs/windows/java.html
Update: Sorry, I think I read the question wrong. I know I've suppressed a .bat window doing something along these lines before:
http://www.geekstogo.com/forum/topic/56092-hide-the-command-prompt-windows/
Invoke start as the first command in your process builder, with the /b option:
ProcessBuilder builder = new ProcessBuilder("start", "/b", "<mybatchcommand>");
// .. set environment, handle streams
builder.start();
The /b options suppresses the command window.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With