I have been trying to figure out how to make a regular java application reopen on close, or simply make it not be able to close. I realize this is possible with a swing application by using DO_NOTHING_ON_CLOSE
but my application does not use swing.
Say I have the following program running:
public static void main(String[] args) {
new MyThread();
}
And MyThread
runs constantly.
Say the user closes the program, is there anyway to detect that a java program is being closed and reopen it, or even better is it possible to make it DO_NOTHING_ON_CLOSE
without swing?