Can an executable jar file can restart itself? For instance, after a user made some choice, the program says “Restart the app?” and the user clicks “Yes” then the jar shuts down and restarts itself.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Needing to restart an application is a sign of bad design.
I would definitely try hard to be able to “reinitialize” the application (reread config files, reestablish connections or what ever) instead of forcing the user to terminate / start the application (even if it’s done automatically).
A half-way “hack” would be to encapsulate your application in some runner-class that’s implements something like: