Set the runtime path after installing

This commit is contained in:
artDev 2022-05-12 23:04:14 +03:00
parent dc7794b64a
commit 00806ea142
2 changed files with 5 additions and 1 deletions

View File

@ -12,7 +12,7 @@ import net.kdt.pojavlaunch.multirt.Runtime;
import java.io.IOException;
public class JRE17Util {
private static final String NEW_JRE_NAME = "Internal-17";
public static final String NEW_JRE_NAME = "Internal-17";
public static boolean checkInternalNewJre(Context context, MultiRTUtils.RuntimeProgressReporter reporter) {
AssetManager assetManager = context.getAssets();
String launcher_jre17_version;

View File

@ -111,6 +111,10 @@ public class MinecraftDownloaderTask extends AsyncTask<String, String, Throwable
if(verInfo.javaVersion.majorVersion <= 17) { // there's a chance we have an internal one for this case
if(!JRE17Util.checkInternalNewJre(mActivity, ((resId, stuff) -> publishProgress("0",mActivity.getString(resId,stuff)))))
showRuntimeFail();
else {
minecraftProfile.javaDir = Tools.LAUNCHERPROFILES_RTPREFIX+JRE17Util.NEW_JRE_NAME;
LauncherProfiles.update();
}
}else showRuntimeFail();
}
} //if else, we are satisfied