geforkt von SteamWar/BungeeCore
Merge pull request 'Java 8 for 1.8 - 1.10' (#297) from java8 into master
Reviewed-on: SteamWar/BungeeCore#297 Reviewed-by: YoyoNow <jwsteam@nidido.de>
Dieser Commit ist enthalten in:
Commit
49f9834240
@ -22,10 +22,7 @@ package de.steamwar.bungeecore;
|
||||
import net.md_5.bungee.api.ProxyServer;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.logging.Level;
|
||||
@ -34,6 +31,14 @@ 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", "-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 {
|
||||
JAVA_8.add("paper-1.8.8.jar");
|
||||
JAVA_8.add("paper-1.10.2.jar");
|
||||
JAVA_8.add("spigot-1.8.8.jar");
|
||||
JAVA_8.add("spigot-1.9.4.jar");
|
||||
JAVA_8.add("spigot-1.10.2.jar");
|
||||
}
|
||||
|
||||
private static final List<Node> nodes = new ArrayList<>();
|
||||
public static Node local = null;
|
||||
@ -74,7 +79,10 @@ public abstract class Node {
|
||||
public abstract double getLoad();
|
||||
|
||||
protected void constructServerstart(File directory, List<String> cmd, String serverJar, String worldDir, String levelName, int port, String xmx, String... dParams) {
|
||||
cmd.add("java");
|
||||
if (JAVA_8.contains(serverJar))
|
||||
cmd.add("/usr/lib/jvm/java-8-openj9-amd64/bin/java");
|
||||
else
|
||||
cmd.add("java");
|
||||
|
||||
for(String param : dParams){
|
||||
cmd.add("-D" + param);
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren