Skip to content

Commit 81ec0c6

Browse files
committed
fix: Use the correct java to start the server.
1 parent 2abaa64 commit 81ec0c6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

CurseForge.Minecraft.Serverpack.Launcher/ForgeMethods.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@ private static async Task InstallForgeAsync(string installPath, string minecraft
2222

2323
var mcVersion = new Version(minecraftVersion);
2424

25-
var javaPath = mcVersion.Minor <= 16 ? GetJavaExecutable() : Path.Combine(installPath, "runtime", "bin", GetJavaExecutable());
25+
var javaInstallPath = mcVersion.Minor <= 16 ? GetJavaExecutable() : Path.Combine(installPath, "runtime", "bin", GetJavaExecutable());
26+
var javaPath = Path.Combine(installPath, "runtime", "bin", GetJavaExecutable());
2627

27-
await RunProcessAsync(installPath, javaPath, false, arguments);
28+
await RunProcessAsync(installPath, javaInstallPath, false, arguments);
2829

2930
var runFile = Path.Combine(installPath, OperatingSystem.IsWindows() ? "run.bat" : "run.sh");
3031

0 commit comments

Comments
 (0)