As the title says. If you register to listen for environment changes then when you exit your application the Java runtime does not terminate.
We are currently not sure of the cause of this, but it's likely to be a thread hanging around somewhere.
The workaround is to call System.exit() when you exit your application.