Fix javaPath not looking for .exe (#7590)

I never tested this on windows and finally decided to get to the bottom of all the weird reports ive been getting
This commit is contained in:
buthed010203 2022-09-17 22:37:00 -04:00 committed by GitHub
parent 5117a5bd71
commit d66a3b80ae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -316,7 +316,8 @@ public class Vars implements Loadable{
logicVars = new GlobalVars();
javaPath =
new Fi(OS.prop("java.home")).child("bin/java").exists() ? new Fi(OS.prop("java.home")).child("bin/java").absolutePath() :
Core.files.local("jre/bin/java").exists() ? Core.files.local("jre/bin/java").absolutePath() :
Core.files.local("jre/bin/java").exists() ? Core.files.local("jre/bin/java").absolutePath() : // Unix
Core.files.local("jre/bin/java.exe").exists() ? Core.files.local("jre/bin/java.exe").absolutePath() : // Windows
"java";
state = new GameState();