jQuery in Action, 3rd edition
The moose likes Beginning Java and the fly likes method to restart an app? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "method to restart an app?" Watch "method to restart an app?" New topic

method to restart an app?

Matt Wilcko
Ranch Hand

Joined: Sep 23, 2003
Posts: 65
I want to have a button in my app that will start the application over.. is there is a method or simply way to do this?
Dirk Schreckmann

Joined: Dec 10, 2001
Posts: 7023
There is no built-in "restart routine".
Your action listener for the reset button should probably reset the appropriate variables to some initial state, and reset any GUI to some initial state.

[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
I have a Java program started by a batch file. When the Java program ends, the batch file looks for an update.bat. If update.bat exists, we run it, erase it and restart the Java program. Otherwise we exit. Would something like that work for you?

A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
I agree. Here's the link: http://aspose.com/file-tools
subject: method to restart an app?
It's not a secret anymore!