I have this very basic code that launches a .jar file. After the file is launched, the console window stays open and I was wondering if there is any way to auto-kill it? Heres the code:
The system function is a horrible kludge. Sounds to me like what you want to do is start a whole new independent process to run your jar file, which will let your program above finish without having to wait for the system call to return (which only happens when whatever program it did finishes).
Your OS API provides far better ways to do this than the kludge that is system.
I know system anything is horrible but I just wanted to write a simple program to launch a file and it works. I just want to know how to auto-kill it now. But thank you for the documentation!