Skip to content

Commit

Permalink
fix: Use the correct java to start the server.
Browse files Browse the repository at this point in the history
  • Loading branch information
itssimple committed Oct 4, 2022
1 parent 2abaa64 commit 81ec0c6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions CurseForge.Minecraft.Serverpack.Launcher/ForgeMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ private static async Task InstallForgeAsync(string installPath, string minecraft

var mcVersion = new Version(minecraftVersion);

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

await RunProcessAsync(installPath, javaPath, false, arguments);
await RunProcessAsync(installPath, javaInstallPath, false, arguments);

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

Expand Down

0 comments on commit 81ec0c6

Please sign in to comment.