Cheok Yan Cheng
Cheok Yan Cheng

Reputation: 42690

Completely Shut Down Java Application

In my standalone GUI application, I will install a Windows Closed handle on the application

formWindowClosed

within the closed handle, I will perform necessary clean up, and did a final System.exit(0) at the every last code.

This works well, until I receive a complain from customer that the program is not able to shut down properly. My suspect is that, there are still pending I/O operation, which cannot even be interrupted by System.exit(0).

I wish to use Process.destroy() too, to give a final HIT to the application.

However, I am not sure how I can obtain current running process.

Upvotes: 0

Views: 276

Answers (1)

Taylor Leese
Taylor Leese

Reputation: 52310

You might want to check out this similar question on SO.

Upvotes: 1

Related Questions