I have the following scenario:
- I have a Java application with Swing;
- Where by means of a jTextField, I get some information;
- With this information, I create a .bat
- This .bat calls an .exe file with the parameters obtained by jTextField.
My problem is that I need my Java application to wait for the .bat file to finish, 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 verifies that the file is still open? Well if you have, I can loop until the screen is closed.