From 363992e02b3d4d5e3b4cdd94675c08433c796af1 Mon Sep 17 00:00:00 2001 From: Zaxar163 <35835496+Zaxar163@users.noreply.github.com> Date: Wed, 31 Oct 2018 12:42:56 +0300 Subject: [PATCH] Update VerRelauncher.java --- .../java/ru/gravit/launcher/relauncher/VerRelauncher.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/javaVerRelauncher/src/main/java/ru/gravit/launcher/relauncher/VerRelauncher.java b/javaVerRelauncher/src/main/java/ru/gravit/launcher/relauncher/VerRelauncher.java index 9e41527a..2a89df7d 100644 --- a/javaVerRelauncher/src/main/java/ru/gravit/launcher/relauncher/VerRelauncher.java +++ b/javaVerRelauncher/src/main/java/ru/gravit/launcher/relauncher/VerRelauncher.java @@ -7,8 +7,7 @@ public final class VerRelauncher { private static final void checkCompat() { if (JavaVersionInfo.MAJOR_VERSION < Helper.getMinVer()) { - if (Helper.isGraphic()) - runGraph(Helper.getErrMessage()); + runGraph(Helper.getErrMessage()); throw new AssertionError(Helper.getErrMessage()); } } @@ -32,7 +31,10 @@ public static void main(final String[] args) { } private static void runGraph(final String errMessage) { - JOptionPane.showMessageDialog(null, errMessage); + try { + Class.forName("javax.swing.JOptionPane", true, ClassLoader.getSystemClassLoader()); + JOptionPane.showMessageDialog(null, errMessage); + } catch (final Throwable t) { } } private static void verifySystemProperties() {