fix: G1 not proposed in Java7?

This commit is contained in:
yuhuihuang 2021-05-13 16:46:23 +08:00
parent 3114e33067
commit 20148d0b02

View File

@ -99,7 +99,7 @@ public class DefaultLauncher extends Launcher {
res.add("-Duser.home=" + options.getGameDir().getParent());
// Force using G1GC with its settings
if (options.getJava().getParsedVersion() >= JavaVersion.JAVA_7) {
if (options.getJava().getParsedVersion() >= JavaVersion.JAVA_8) {
res.add("-XX:+UnlockExperimentalVMOptions");
res.add("-XX:+UseG1GC");
res.add("-XX:G1NewSizePercent=20");