what I would like to do is run the batch file several times from a java application. So I installed a for-loop that runs this code n times:
for (int i = 0; i < n; i++) { Runtime.getRuntime().exec("cmd /c start somefile.bat"); }
The problem is that every time the command is run, a new cmd window appears. However, what I want is just one window that appears at the beginning and is used to display all the data from the following command calls.
How can i do this?
java for-loop batch-file windows-runtime
user2426316
source share