The Winter Rescue

The Winter Rescue

300k Downloads

[Bug] serverstarter trying to use java 18 instead of java 11 or java 15

SwapnanilKayal opened this issue ยท 2 comments

commented

Error Behaviour

server trying to use java 18 instead of java 11 or java 15, thus unable to start server.

Expected Behaviour

Atleast a place where I can point out the java binary

Reproduce

  1. Install Java 18
  2. Install Java 11
  3. Try To Start the serverstarter though the bat given

Crash Report

No response

Modpack version

0.4.7

Server version

No response

Other mods and plugins

No response

commented

This isn't an issue with the pack, this is an issue with the way having multiple Java installs works, and the way batch files access Java. If you have multiple versions, unless you specify, the latest one you've installed will override the environment variables used to let cmd (and batch files) locate and use it without putting in the entire path to java.

What you can do to work around this is open the batch file's code in a program like Notepad (using "Edit" on the right click menu in Windows, or "Open With" in the same menu) and, assuming it works like any other Minecraft server batch I've seen, change "javaw" or "java" to instead be "C:[path to JRE executable location]\java.exe" for the version you want to use.

I can't say exactly where yours is located without knowing where you got your Java, but as I'm using Eclipse Adoptiom, my Java 8, for example, is located at "C:\Program Files\Eclipse Adoptium\jdk-8.0.332.9-hotspot\jre\bin\java.exe"

commented

Seems to be done