How can I restart an application from within it?
If your application was originally supplied command-line options when it first executed, Restart will launch the application again with the same options.
Strictly speaking, a Java program cannot restart itself since to do so it must kill the JVM in which it is running and then start it again, but once the JVM is no longer running (killed) then no action can be taken.
Need the application to close and restart itself. Application. Restart();
Application.Restart is what you are looking for I think. I used this on one project and have to say that it worked fine for me - but other people seem to have run into issues with this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With