Mod installer: Fail when Java 8 is not selected

This commit is contained in:
Duy Tran Khanh 2021-09-29 15:42:05 +07:00 committed by GitHub
parent e021d4220e
commit 7df3d7e05e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -285,6 +285,13 @@ public class JavaGUILauncherActivity extends LoggableActivity implements View.On
JREUtils.redirectAndPrintJRELog(this); JREUtils.redirectAndPrintJRELog(this);
try { try {
jreReleaseList = JREUtils.readJREReleaseProperties(); jreReleaseList = JREUtils.readJREReleaseProperties();
// Fail immediately when Java 8 is not selected
// TODO: auto override Java 8 if installed
if (!jreReleaseList.get("JAVA_VERSION").equals("1.8.0")) {
throw new RuntimeException("Cannot use the mod installer. In order to use the mod installer, you need to install Java 8 and specify it in the Preferences menu.");
}
List<String> javaArgList = new ArrayList<String>(); List<String> javaArgList = new ArrayList<String>();
// Enable Caciocavallo // Enable Caciocavallo