The solution to the issue for 7u8 is as follows:
1. Re-apply the fix for 7162144.
2. The EventDispatchThread.run() must check whether the event thread is still in the interrupted state, and if not, reset the shutdown flag before calling to detachDispatchThread().
A solution for JDK 8 is currently being discussed and is likely to be implemented later.