mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-15 14:56:05 -04:00
fix: IllegalAccessError on Java 16
This commit is contained in:
parent
20148d0b02
commit
a53d2a1370
@ -130,6 +130,9 @@ public class DefaultLauncher extends Launcher {
|
|||||||
if (options.getMinMemory() != null && options.getMinMemory() > 0)
|
if (options.getMinMemory() != null && options.getMinMemory() > 0)
|
||||||
res.add("-Xms" + options.getMinMemory() + "m");
|
res.add("-Xms" + options.getMinMemory() + "m");
|
||||||
|
|
||||||
|
if (options.getJava().getParsedVersion() >= JavaVersion.JAVA_16)
|
||||||
|
res.add("--illegal-access=permit");
|
||||||
|
|
||||||
res.add("-Dfml.ignoreInvalidMinecraftCertificates=true");
|
res.add("-Dfml.ignoreInvalidMinecraftCertificates=true");
|
||||||
res.add("-Dfml.ignorePatchDiscrepancies=true");
|
res.add("-Dfml.ignorePatchDiscrepancies=true");
|
||||||
}
|
}
|
||||||
|
@ -96,6 +96,7 @@ public final class JavaVersion {
|
|||||||
public static final int JAVA_7 = 7;
|
public static final int JAVA_7 = 7;
|
||||||
public static final int JAVA_8 = 8;
|
public static final int JAVA_8 = 8;
|
||||||
public static final int JAVA_9 = 9;
|
public static final int JAVA_9 = 9;
|
||||||
|
public static final int JAVA_16 = 16;
|
||||||
|
|
||||||
private static int parseVersion(String version) {
|
private static int parseVersion(String version) {
|
||||||
Matcher matcher = VERSION.matcher(version);
|
Matcher matcher = VERSION.matcher(version);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user