title: Get notification on a Java process termination
body: <p>There is a console Java application which is supposed to run until it is stopped by <kbd>Ctrl</kbd>+<kbd>C</kbd> or closing the console window. How that application can be programmed to execute a clean up code before exit?</p>