The need to restart the application is a sign of poor design.
I would definitely try to “reinitialize” the application (re-read configuration files, reconnect or ever), instead of forcing the user to terminate / launch the application (even if it was done automatically).
"" runner, - :
public class Runner {
public static void main(String... args) {
while (true) {
try {
new YourApplication().run();
return;
} catch (RestartException re) {
}
}
}
}