Closed bitcynth closed 2 years ago
This is now supported in the lastest changes. Any other config option where supporting a environment variable makes sense?
However I don't think changing it in the sh file is a good idea. There is a good chance there is no JAVA_HOME however the java binary is in the PATH (or whatever it is called on Linux ^^) This shouldn't be a problem anyways, as the serverstarter is not limited to java8
I can't quite remember what my issue was with Java 14, and the latest changes are good enough for me.
But you could check if JAVA_HOME is set or not in the shell script and fallback to java in the PATH.
I won't close this issue and will let you decide if you want to implement that or not.
If not, feel free to close this issue as I am personally fine with the current solution. :)
Currently ServerStarter doesn't respect the
JAVA_HOME
environment variable which causes issues when the default binary forjava
is Java 14 but the javaArgs includes things only available on Java 8 (Java 8 still being the default for Minecraft).This can be solved for individual installs by setting
forcedJavaPath
to the binary but for modpack distribution, this is not ideal as this will change from system to system.An alternative solution would be to allow environment variables in the
forcedJavaPath
setting, so that the below example would work:Update
This is also an issue with the start scripts.
For the shell script/Linux version this could very easily be fixed by doing something like the following