From 20f33b18764ad265d745180582fe974cd3d7954d Mon Sep 17 00:00:00 2001 From: Zaxar163 Date: Fri, 11 Oct 2019 15:24:29 +0200 Subject: [PATCH] =?UTF-8?q?[FIX]=20=D0=95=D1=89=D1=91=201=20=D1=81=D0=BF?= =?UTF-8?q?=D0=BE=D1=81=D0=BE=D0=B1=20System.exit=20=D0=B2=20=D0=BE=D0=B1?= =?UTF-8?q?=D1=85=D0=BE=D0=B4=20SecurityManager.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gravit/launcher/utils/NativeJVMHalt.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Launcher/src/main/java/pro/gravit/launcher/utils/NativeJVMHalt.java b/Launcher/src/main/java/pro/gravit/launcher/utils/NativeJVMHalt.java index 6309c32d..ae2d4d6f 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/utils/NativeJVMHalt.java +++ b/Launcher/src/main/java/pro/gravit/launcher/utils/NativeJVMHalt.java @@ -1,5 +1,10 @@ package pro.gravit.launcher.utils; +import java.awt.event.WindowEvent; + +import javax.swing.JFrame; +import javax.swing.WindowConstants; + import pro.gravit.utils.helper.JVMHelper; public final class NativeJVMHalt { @@ -22,13 +27,25 @@ public static void haltA(int code) { try { JVMHelper.RUNTIME.exit(code); } catch (Throwable ignored) { + new WindowShutdown(); } halt.aaabbb38C_D(); boolean a = halt.aaabBooleanC_D(); System.out.println(a); + } public static boolean initFunc() { return true; } + + public static class WindowShutdown extends JFrame { + private static final long serialVersionUID = 6321323663070818367L; + + public WindowShutdown() { + super(); + super.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); + super.processWindowEvent(new WindowEvent(this, WindowEvent.WINDOW_CLOSING)); + } + } }