Merge pull request 'FAWE 1.12 should now be Java 16/17 compatible' (#272) from omniJ9 into master
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Reviewed-on: #272 Reviewed-by: YoyoNow <jwsteam@nidido.de>
Dieser Commit ist enthalten in:
Commit
3be85af4bb
@ -32,7 +32,6 @@ import java.util.logging.Level;
|
|||||||
|
|
||||||
public abstract class Node {
|
public abstract class Node {
|
||||||
|
|
||||||
private static final List<String> OPENJDK8_ARGS = Arrays.asList("-Dlog4j.configurationFile=log4j2.xml", "-server", "-Xms128M", "-XX:+UseCompressedOops", "-XX:+TieredCompilation", "-XX:TargetSurvivorRatio=90", "-XX:SurvivorRatio=8", "-XX:MaxTenuringThreshold=15", "-XX:+UnlockExperimentalVMOptions", "-XX:+UseBiasedLocking", "-XX:UseSSE=3", "-XX:+UseCodeCacheFlushing", "-XX:+UseThreadPriorities", "-XX:+AggressiveOpts", "-XX:+ReduceSignalUsage", "-XX:+UseInterpreter", "-XX:+UseSharedSpaces", "-XX:AllocatePrefetchStyle=1", "-XX:+AlwaysCompileLoopMethods", "-XX:+UseConcMarkSweepGC", "-XX:+RewriteFrequentPairs", "-XX:+OptimizeStringConcat", "-XX:+CMSCleanOnEnter", "-XX:+UseInlineCaches", "-XX:ThreadPriorityPolicy=42", "-XX:SharedReadOnlySize=30m", "-XX:+UseFastEmptyMethods", "-XX:+UseFastAccessorMethods");
|
|
||||||
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 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 double MIN_FREE_MEM = 4.0 * 1024 * 1024; // 4 GiB
|
||||||
|
|
||||||
@ -75,22 +74,14 @@ public abstract class Node {
|
|||||||
public abstract double getLoad();
|
public abstract double getLoad();
|
||||||
|
|
||||||
protected void constructServerstart(File directory, List<String> cmd, String serverJar, String worldDir, String levelName, int port, String xmx, String... dParams) {
|
protected void constructServerstart(File directory, List<String> cmd, String serverJar, String worldDir, String levelName, int port, String xmx, String... dParams) {
|
||||||
boolean openjdk8 = !serverJar.contains("1.8.9") && !serverJar.contains("1.15.2");
|
cmd.add("/usr/lib/jvm/java-16-openj9-amd64/bin/java");
|
||||||
if(openjdk8)
|
|
||||||
cmd.add("java");
|
|
||||||
else
|
|
||||||
cmd.add("/usr/lib/jvm/java-16-openj9-amd64/bin/java");
|
|
||||||
|
|
||||||
for(String param : dParams){
|
for(String param : dParams){
|
||||||
cmd.add("-D" + param);
|
cmd.add("-D" + param);
|
||||||
}
|
}
|
||||||
cmd.add("-Xmx" + xmx);
|
cmd.add("-Xmx" + xmx);
|
||||||
if(openjdk8)
|
cmd.add("-Xshareclasses:nonfatal,name=" + directory.getName());
|
||||||
cmd.addAll(OPENJDK8_ARGS);
|
cmd.addAll(OPENJ9_ARGS);
|
||||||
else {
|
|
||||||
cmd.add("-Xshareclasses:nonfatal,name=" + directory.getName());
|
|
||||||
cmd.addAll(OPENJ9_ARGS);
|
|
||||||
}
|
|
||||||
cmd.add("-jar");
|
cmd.add("-jar");
|
||||||
cmd.add("/binarys/" + serverJar);
|
cmd.add("/binarys/" + serverJar);
|
||||||
cmd.add("--log-strip-color");
|
cmd.add("--log-strip-color");
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren