In my Java program, I create a process that executes a command to run a batch file like this:
try { File tempFile = new File(\"C:/Users/Public/temp.c
I manged to find the answer elsewhere. To keep the initial process open until the batch file finished all you need is "/wait"
Process p = Runtime.getRuntime().exec("cmd /C start /wait filepath.bat"); int exitVal = p.waitFor();