Hello friends,
I want to start and stop a jar file using another jar file or java class. I am able to start the jar file using this command:
Runtime run=Runtime.getRuntime();
Process process=run.exec("java -jar setvalue.jar");
The process is started and working fine. But I am not getting how I can close that process from other java class / jar file. I want to run setvalue.jar file as a background process.And able to start and stop that using other java file and jar file. Can some one have an idea how can I do that?
Thanks In advance.