Hey guys,
I’m trying to execute another jar file from inside my java program, like so:
String command = "java -jar filename.jar"
Runtime.getRuntime().exec(command);
The issue is I want to be able to exit the parent java process without having to wait for the child process to complete.
This seems to work, however the child process won’t print to the terminal, nor can I quit it (by ctrl+C). I have to go into the process manager and kill it manually.
I’ve tried ProcessBuilder.inheritIO() too but it only works for me on windows (not linux - I can see output but not do input to close the application etc.)
Do you guys have any ideas of how to fix this?
Thanks