I want for my program to be able to launch another copy of itself, this
new Thread(){
public void run() {
main.main(new String[]{});
}
}.start();
is what I have thus far. And it works. (The main class, in main.java launches the rest of the program and serves a back-end throughout general operations).
Now though, when I press the close button on any of the windows, it will close them all down. The desired effect is for it only close one down.
I’ve tried various things with Application.ExitListener with no joy and I also tried opening up the new window with an alternative method:
main s = new main();
s.main(new String[]{});
I was considering getting the file path and then simply having it Runtime.getRuntime().exec(); itself from there. On this attempt, I was able to get the path fine but not the name of the .jar file.
Sounds like you are using:
that should be: