geforkt von SteamWar/BungeeCore
Fix Java 8 start
Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Ursprung
29b228bd8d
Commit
265daaa44d
@ -29,7 +29,7 @@ import java.util.logging.Level;
|
||||
|
||||
public abstract class Node {
|
||||
|
||||
private static final List<String> OPENJ9_ARGS = Arrays.asList("-Xgc:excessiveGCratio=80", "-Xsyslog:none", "-Xtrace:none", "-Xdisableexplicitgc", "-XX:+AlwaysPreTouch", "-XX:+CompactStrings", "-XX:-HeapDumpOnOutOfMemory", "-XX:+ExitOnOutOfMemoryError", "--add-opens", "java.base/jdk.internal.misc=ALL-UNNAMED", "-Dlog4j.configurationFile=log4j2.xml");
|
||||
private static final List<String> OPENJ9_ARGS = Arrays.asList("-Xgc:excessiveGCratio=80", "-Xsyslog:none", "-Xtrace:none", "-Xdisableexplicitgc", "-XX:+AlwaysPreTouch", "-XX:+CompactStrings", "-XX:-HeapDumpOnOutOfMemory", "-XX:+ExitOnOutOfMemoryError", "-Dlog4j.configurationFile=log4j2.xml");
|
||||
private static final double MIN_FREE_MEM = 4.0 * 1024 * 1024; // 4 GiB
|
||||
private static final Set<String> JAVA_8 = new HashSet<>();
|
||||
static {
|
||||
@ -90,6 +90,10 @@ public abstract class Node {
|
||||
cmd.add("-Xmx" + xmx);
|
||||
cmd.add("-Xshareclasses:nonfatal,name=" + directory.getName());
|
||||
cmd.addAll(OPENJ9_ARGS);
|
||||
if (!JAVA_8.contains(serverJar)) {
|
||||
cmd.add("--add-opens");
|
||||
cmd.add("java.base/jdk.internal.misc=ALL-UNNAMED");
|
||||
}
|
||||
cmd.add("-jar");
|
||||
cmd.add("/binarys/" + serverJar);
|
||||
cmd.add("--log-strip-color");
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren