public class App {
public static void main(String[] args) {
Process p = Runtime.getRuntime().exec("java -jar someOtherProgram.jar");
}
}
This effectively runs my other program. However, this program (App) does not close. It is still running (I can tell because it won't let me kill it in Eclipse). The only way to close this program is by killing the process that corresponds to someOtherProgram.jar
.
What I want is for my program, App, to run another Java program. And then kill itself.