--- old/src/macosx/classes/com/apple/eawt/_AppEventHandler.java 2012-03-23 20:29:13.000000000 +0400 +++ new/src/macosx/classes/com/apple/eawt/_AppEventHandler.java 2012-03-23 20:29:13.000000000 +0400 @@ -157,7 +157,10 @@ } }); } finally { - nativeReplyToAppShouldTerminate(true); + // Either we've just called System.exit(), or the app will call + // it when processing a WINDOW_CLOSING event. Either way, we reply + // to Cocoa that we don't want to exit the event loop yet. + nativeReplyToAppShouldTerminate(false); } }