Skip to content

Commit eeb62d4

Browse files
authored
Corrected the examples for JVM_OPTS (#3746)
1 parent a8d8bfe commit eeb62d4

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

docs/configuration/jvm-options.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,28 +57,28 @@ To let the JVM calculate the heap size from the container declared memory limit,
5757
## Extra JVM Options
5858

5959
General JVM options can be passed to the Minecraft Server invocation by passing a `JVM_OPTS`
60-
environment variable. The JVM requires `-XX` options to precede `-X` options, so those can be declared in `JVM_XX_OPTS`. Both variables are space-delimited, raw JVM arguments.
60+
environment variable. If needing to set `-XX` options, then pass those with the `JVM_XX_OPTS` variable instead. Both variables accept space-delimited, raw JVM arguments.
6161

6262
```
63-
docker run ... -e JVM_OPTS="-someJVMOption someJVMOptionValue" ...
63+
docker run ... -e JVM_OPTS="-XsomeJVMOption -DpropName=value" ...
6464
```
6565

6666
**NOTE** When declaring `JVM_OPTS` in a compose file's `environment` section with list syntax, **do not** include the quotes:
6767

6868
```yaml
6969
environment:
7070
- EULA=true
71-
- JVM_OPTS=-someJVMOption someJVMOptionValue
71+
- JVM_OPTS=-XsomeJVMOption -DpropName=value
7272
```
7373
7474
Using object syntax is recommended and more intuitive:
7575
7676
```yaml
7777
environment:
7878
EULA: "true"
79-
JVM_OPTS: "-someJVMOption someJVMOptionValue"
80-
# or
81-
# JVM_OPTS: -someJVMOption someJVMOptionValue
79+
JVM_OPTS: "-XsomeJVMOption -DpropName=value"
80+
# or without quotes
81+
# JVM_OPTS: -XsomeJVMOption -DpropName=value
8282
```
8383

8484
As a shorthand for passing several system properties as `-D` arguments, you can instead pass a comma separated list of `name=value` or `name:value` pairs with `JVM_DD_OPTS`. (The colon syntax is provided for management platforms like Plesk that don't allow `=` inside a value.)

0 commit comments

Comments
 (0)