From 29519728b8e81f9b527a703becc1047984b3ad73 Mon Sep 17 00:00:00 2001 From: Zaxar163 Date: Tue, 24 Sep 2019 19:25:49 +0200 Subject: [PATCH] =?UTF-8?q?[FIX]=201.14=20=D0=B7=D0=B0=D0=BF=D1=83=D1=81?= =?UTF-8?q?=D0=BA.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/pro/gravit/launcher/client/ClientLauncher.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Launcher/src/main/java/pro/gravit/launcher/client/ClientLauncher.java b/Launcher/src/main/java/pro/gravit/launcher/client/ClientLauncher.java index c816ddc9..0ad7b597 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/client/ClientLauncher.java +++ b/Launcher/src/main/java/pro/gravit/launcher/client/ClientLauncher.java @@ -304,11 +304,11 @@ private static void launch(ClientProfile profile, Params params) throws Throwabl LogHelper.debug("Args: " + copy); // Resolve main class and method Class mainClass = classLoader.loadClass(profile.getMainClass()); - MethodHandle mainMethod = MethodHandles.publicLookup().findStatic(mainClass, "main", MethodType.methodType(void.class, String[].class)); + MethodHandle mainMethod = MethodHandles.publicLookup().findStatic(mainClass, "main", MethodType.methodType(void.class, String[].class)).asFixedArity(); Launcher.LAUNCHED.set(true); JVMHelper.fullGC(); // Invoke main method - mainMethod.invoke((Object) args.toArray(new String[0])); + mainMethod.invokeWithArguments((Object)args.toArray(new String[0])); } private static Process process = null;