Program closes fine when run from cmd but .jar doesn't close.
I`m developing a simple java application and I've run into a rather annoying issue. When I run my application from the command line using > java Main it behaves as expected, specifically when I close the window the program exits gracefully. However when I build it as a jar using > jar cfe app.jar Main Main.class Form.class it doesn't do anything when I hit the close button and I have to kill the process.
The app simply displays a randomly selected message if the app hasn't been run earlier in the day.
This is my main method.
The solution was simply to include the class file Form$1.class in the jar
>jar cfe app.jar Main Main.class Form.class Form$1.class
>jar cfe app.jar Main *
|All times are GMT -5. The time now is 01:40 AM.|