[FIX] 1.14 запуск.

This commit is contained in:
Zaxar163 2019-09-24 19:25:49 +02:00
parent 56bd3f1268
commit 29519728b8
No known key found for this signature in database
GPG key ID: 1FE4F2E1F053831B

View file

@ -304,11 +304,11 @@ private static void launch(ClientProfile profile, Params params) throws Throwabl
LogHelper.debug("Args: " + copy); LogHelper.debug("Args: " + copy);
// Resolve main class and method // Resolve main class and method
Class<?> mainClass = classLoader.loadClass(profile.getMainClass()); 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); Launcher.LAUNCHED.set(true);
JVMHelper.fullGC(); JVMHelper.fullGC();
// Invoke main method // Invoke main method
mainMethod.invoke((Object) args.toArray(new String[0])); mainMethod.invokeWithArguments((Object)args.toArray(new String[0]));
} }
private static Process process = null; private static Process process = null;