Table of Contents

Class JvmArgs

Namespace
McServerLauncher.Services
Assembly
McServerLauncher.dll

Reads a server's extra JVM arguments for the decisions the automatic memory profile must leave to their owner.

public static class JvmArgs
Inheritance
JvmArgs
Inherited Members

Remarks

The extra arguments come after the app's own on the command line, and the JVM keeps the last value of an option, so whatever the user wrote already wins. That is not enough: an automatic profile laid under somebody's -Xmx6G would still pick its own collector and margins around numbers it did not choose, and the result would be neither theirs nor the app's. A server whose arguments size the heap, pick a collector or tune how memory is given back is treated as Manual.

-XX:+UseG1GC alone does not count. It names the collector the profile uses anyway, and it is in half the start scripts on the internet; treating it as a choice would leave most imported servers on fixed memory for a flag that changes nothing.

Methods

MentionsCompactHeaders(string?)

True if the arguments already say something about compact object headers, which the profile then leaves out rather than contradict.

public static bool MentionsCompactHeaders(string? args)

Parameters

args string

Returns

bool

Remarks

Turning compressed class pointers off counts too: compact headers depend on them, and a JVM given both refuses to start.

SetsMemory(string?)

True if the arguments size the heap, choose a collector other than G1, or tune how memory is returned — anything the automatic profile would otherwise decide.

public static bool SetsMemory(string? args)

Parameters

args string

Returns

bool

Split(string?)

Splits a command line the way the JVM receives it: on spaces, keeping quoted runs whole.

public static IReadOnlyList<string> Split(string? args)

Parameters

args string

Returns

IReadOnlyList<string>