Quantcast
Channel: Confirm before exiting Java program running in CMD - Stack Overflow
Browsing all 3 articles
Browse latest View live

Answer by Serge Ballesta for Confirm before exiting Java program running in CMD

As a complement to Prashant answer and to Disable close button on DOS program in Windows 7, I found some interesting elements on CodeProject Disable System Close Button on a Console Application.If you...

View Article



Answer by Prashant for Confirm before exiting Java program running in CMD

This should be able to intercept the signalRuntime.getRuntime().addShutdownHook(new Thread() { public void run() { /* my shutdown code here */ } });More information here:How can I "intercept" Ctrl+C in...

View Article

Confirm before exiting Java program running in CMD

I have a Java program that continuously runs with the command prompt open. Now, if the user tries to exit the program either by pressing CTRL + C or by clicking on the close button, I want to display a...

View Article
Browsing all 3 articles
Browse latest View live


Latest Images