I have a code similar to:
URL url = Activator.getDefault().getBundle().getEntry("/resources/server.bat");
String fileURL = FileLocator.toFileURL(url).toString();
String commandLine = "cmd.exe /c start " +fileURL;
Process process= Runtime.getRuntime().exec(commandLine);
How can I kill the process as soon as the work is done in java
process.destroy()But it won’t have control over the process started from
server.batthose are separately started