1

Ones my application finishes executing, I need to restart it in order to be able to reuse it again. My application has multiple threads (and some chromedriver.exe issues). Therefore, I prefer NOT to create additional threads in order to restart it. Currently I am simply closing the GUI window and then reopen my application by double clicking on the application.exe file.

I am curious if there is a way I could add an actionListener to a "RESTART" button that would close and reopen my application?

Buras
  • 3,069
  • 28
  • 79
  • 126

1 Answers1

2

try this code

 Runtime.getRuntime().exec("my App");
 System.exit(0);
aymankoo
  • 653
  • 6
  • 12