0
I have the following scenario:
- I have a Java application with Swing;
- Where through a jTextField, I get a piece of information;
- With this information, I create a . bat
- This . bat calls a file . exe with the parameters obtained by jTextField.
My problem is that I need my Java application to wait for the file to be finished. bat, because to continue the process in the Java application without errors, I need the information that this . bat will return.
Is there a function that checks if the file is still open? Because if it is, I can loop until the screen is closed.
Could supplement the question with the code you are using to run the batch file.
– Homer Simpson
Please provide a [mcve] so that it is possible to visualize and test the problem.
– user28595
It is a simple code that generates a file . bat and at the end executes.
– Guilherme Bigois
@Articuno, I said it was simple, look at the answer of #escapistabr...
– Guilherme Bigois