I understand the following is the typical code to launch an exe from java
Runtime rt = Runtime.getRuntime(); Process proc = rt.exec("some.exe");
or with parameter
Process process = new ProcessBuilder("some.exe","param1","param2").start();
I have a web application which wraps an exe and users can execute these on request. As I understand the above two approaches will always create a new process on every request. I want to avoid this.
Is there way, wherein I keep a pool of reusable loaded instances and use them in the typical concurrent scenario. I want avoid a situation wherein each user request launches a new process.