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 <TheKodeToad@proton.me>
This commit is contained in:
TheKodeToad 2022-11-03 18:11:42 +00:00
parent 1da834f650
commit 9931c9a286
2 changed files with 1 additions and 16 deletions

View File

@ -629,21 +629,6 @@ QString MinecraftInstance::createLaunchScript(AuthSessionPtr session, MinecraftS
launchScript += "sessionId " + session->session + "\n"; 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()) for (auto trait : profile->getTraits())
{ {
launchScript += "traits " + trait + "\n"; launchScript += "traits " + trait + "\n";

View File

@ -81,7 +81,6 @@ public final class EntryPoint {
if (exitCode != ExitCode.NORMAL) { if (exitCode != ExitCode.NORMAL) {
LOGGER.warning("Exiting with " + exitCode); LOGGER.warning("Exiting with " + exitCode);
// noinspection CallToSystemExit
System.exit(exitCode.numericalCode); System.exit(exitCode.numericalCode);
} }
} }
@ -97,6 +96,7 @@ public final class EntryPoint {
return PreLaunchAction.ABORT; return PreLaunchAction.ABORT;
else { else {
String[] pair = StringUtils.splitStringPair(' ', input); String[] pair = StringUtils.splitStringPair(' ', input);
if (pair == null) if (pair == null)
throw new ParseException(String.format( throw new ParseException(String.format(
"Could not split input string '%s' by space. All input provided from stdin must be either 'launch', 'abort', or " "Could not split input string '%s' by space. All input provided from stdin must be either 'launch', 'abort', or "