From 9931c9a286c1746c1fb290da50ab31c9d7c7d228 Mon Sep 17 00:00:00 2001 From: TheKodeToad Date: Thu, 3 Nov 2022 18:11:42 +0000 Subject: [PATCH] Remove arguments being passed twice Passing the classpath into stdin has no effect. Java is already provided the classpath with -cp, which pretty much takes up the largest part of the arguments anyway, which leads me to wonder, what's the point of stdin arguments at all? Signed-off-by: TheKodeToad --- launcher/minecraft/MinecraftInstance.cpp | 15 --------------- .../launcher/org/prismlauncher/EntryPoint.java | 2 +- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/launcher/minecraft/MinecraftInstance.cpp b/launcher/minecraft/MinecraftInstance.cpp index 5a5245ed..39a7198c 100644 --- a/launcher/minecraft/MinecraftInstance.cpp +++ b/launcher/minecraft/MinecraftInstance.cpp @@ -629,21 +629,6 @@ QString MinecraftInstance::createLaunchScript(AuthSessionPtr session, MinecraftS launchScript += "sessionId " + session->session + "\n"; } - // libraries and class path. - { - QStringList jars, nativeJars; - profile->getLibraryFiles(runtimeContext(), jars, nativeJars, getLocalLibraryPath(), binRoot()); - for(auto file: jars) - { - launchScript += "cp " + file + "\n"; - } - for(auto file: nativeJars) - { - launchScript += "ext " + file + "\n"; - } - launchScript += "natives " + getNativePath() + "\n"; - } - for (auto trait : profile->getTraits()) { launchScript += "traits " + trait + "\n"; diff --git a/libraries/launcher/org/prismlauncher/EntryPoint.java b/libraries/launcher/org/prismlauncher/EntryPoint.java index c33ab983..36831179 100644 --- a/libraries/launcher/org/prismlauncher/EntryPoint.java +++ b/libraries/launcher/org/prismlauncher/EntryPoint.java @@ -81,7 +81,6 @@ public final class EntryPoint { if (exitCode != ExitCode.NORMAL) { LOGGER.warning("Exiting with " + exitCode); - // noinspection CallToSystemExit System.exit(exitCode.numericalCode); } } @@ -97,6 +96,7 @@ public final class EntryPoint { return PreLaunchAction.ABORT; else { String[] pair = StringUtils.splitStringPair(' ', input); + if (pair == null) throw new ParseException(String.format( "Could not split input string '%s' by space. All input provided from stdin must be either 'launch', 'abort', or "