Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Minecraft:Java Edition client command line arguments: Difference between revisions

From SAS Gaming Wiki
SyncBot (talk | contribs)
Sync: updated from Minecraft
SyncBot (talk | contribs)
Sync: updated from Minecraft
Line 19: Line 19:
! Description
! Description
|-
|-
| {{code|-Djava.library.path{{=}}{{ph|natives folder}}}}
| {{code|-Djava.library.path{{=}}{{ph|natives folder}}/java}}
| The path to the native libraries.
| The path to the native libraries.
|-
|-
| {{code|-cp {{ph|jars}}}}
| {{code|-Djna.tmpdir{{=}}{{ph|natives folder}}/jna}}
| The absolute paths listing the game and library jars to load, separated by {{code|;}} on Windows or {{code|:}} on Linux and macOS.
| The path {{wp|Java Native Access}} uses for temporary files.
|-
| {{code|-Dorg.lwjgl.system.SharedLibraryExtractPath{{=}}{{ph|natives folder}}/lwjgl}}
| The path containing {{wp|LWJGL}}.
|-
| {{code|-Dio.netty.native.workdir{{=}}{{ph|natives folder}}/netty}}
| The path {{wp|Netty (software)|Netty}} uses.
|-
|-
| {{code|-Dminecraft.launcher.brand{{=}}{{ph|launcher name}}}}
| {{code|-Dminecraft.launcher.brand{{=}}{{ph|launcher name}}}}
Line 31: Line 37:
| The version of the launcher.{{info needed|What does the game use this information for?}}
| The version of the launcher.{{info needed|What does the game use this information for?}}
|-
|-
| {{code|-Dos.name{{=}}Windows 10 -Dos.version{{=}}10.0}}
| {{code|-cp {{ph|jars}}}}
| Tells Java to state that it is running on Windows 10 even when it's not.{{info needed|Why and when is this used?}}
| The absolute paths listing the game and library jars to load, separated by {{code|;}} on Windows or {{code|:}} on Linux and macOS.
|-
| {{code|-XstartOnFirstThread}}
| Tells the JVM to start on the first thread.<br>Some macOS versions require this while others break with it, leaving the game stuck as "not responding".
|-
|-
| {{code|-XX:HeapDumpPath{{=}}MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump}}
| {{code|-XX:HeapDumpPath{{=}}MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump}}
| Supposedly makes Intel drivers on laptops with two GPUs use the dedicated GPU.<ref>{{reddit|d8j90e|comment/f1b2anr|apparently Intel drivers on laptops with two graphics cards scan the process name for strings like "minecraft" and "javaw.exe" and switch to the dedicated GPU if it sees those names.|scratchisthebest|September 24, 2019}}</ref>
| Supposedly makes Intel drivers on laptops with two GPUs use the dedicated GPU.<ref>{{reddit|d8j90e|comment/f1b2anr|apparently Intel drivers on laptops with two graphics cards scan the process name for strings like "minecraft" and "javaw.exe" and switch to the dedicated GPU if it sees those names.|scratchisthebest|September 24, 2019}}</ref>
|-
| {{code|-XstartOnFirstThread}}
| Tells the JVM to start on the first thread.<br>Some macOS versions require this while others break with it, leaving the game stuck as "not responding".
|-
|-
| {{code|-Xss1M}}
| {{code|-Xss1M}}
Line 60: Line 66:
|-
|-
| {{code|--xuid {{ph|XUID}}}}
| {{code|--xuid {{ph|XUID}}}}
| The Xbox User ID.
| The player's Xbox User ID.
|-
| {{code|--userType {{ph|authentication scheme}}}}
| The authentication scheme used for logging in.
{{code|msa}} for [[Minecraft:Microsoft authentication]]<br>
{{code|mojang}} for [[Minecraft:Yggdrasil|Yggdrasil (Legacy Mojang authentication)]]<br>
{{code|legacy}} for [[Minecraft:Legacy Minecraft authentication]]
|-
|-
| {{code|--accessToken {{ph|access token}}}}
| {{code|--accessToken {{ph|access token}}}}
Line 85: Line 85:
| {{code|--assetsDir {{ph|assets folder}}}}
| {{code|--assetsDir {{ph|assets folder}}}}
| The folder that contains, among others, the {{file|directory|objects}} folder. {{file|directory|[[Minecraft:.minecraft]]/assets}} by default.
| The folder that contains, among others, the {{file|directory|objects}} folder. {{file|directory|[[Minecraft:.minecraft]]/assets}} by default.
|-
| {{code|--resourcePackDir {{ph|resource pack folder}}}}
| The folder for resource packs. {{file|directory|[[Minecraft:.minecraft]]/resourcepacks}} by default.
|-  
|-  
| {{code|--assetIndex {{ph|assets index name}}}}
| {{code|--assetIndex {{ph|assets index name}}}}
Line 90: Line 93:
|-
|-
| {{code|--width {{ph|width}}}}
| {{code|--width {{ph|width}}}}
| The initial width of the game's window.
| The initial width of the game's window. {{code|854}} by default.
|-
|-
| {{code|--height {{ph|height}}}}
| {{code|--height {{ph|height}}}}
| The initial height of the game's window.
| The initial height of the game's window. {{code|480}} by default.
|-
|-
| {{code|--disableMultiplayer}}
| {{code|--disableMultiplayer}}
Line 105: Line 108:
|-
|-
| {{code|--quickPlaySingleplayer {{ph|world name}}}}
| {{code|--quickPlaySingleplayer {{ph|world name}}}}
| The optional name of the world to automatically join once the game has started.
| The optional name of the world to automatically join once the game has started. A blank name joins the most recently played world.
|-
|-
| {{code|--quickPlayMultiplayer {{ph|server address}}}}
| {{code|--quickPlayMultiplayer {{ph|server address}}}}
| The optional address of a server to automatically join once the game has started.
| The optional address of a server to automatically join once the game has started.{{info needed|Does a blank name join the most recently played server?}}
|-
|-
| {{code|--quickPlayRealms {{ph|realm ID}}}}
| {{code|--quickPlayRealms {{ph|realm ID}}}}
| The optional ID of a realm to automatically join once the game has started.
| The optional ID of a realm to automatically join once the game has started.
|-
| {{code|--fullscreen}}
| Launches the game directly into fullscreen.
|-
| {{code|--fullscreenWidth {{ph|fullscreen width}}}}
| unknown{{info needed|What does this do?}}
|-
| {{code|--fullscreenHeight {{ph|fullscreen height}}}}
| unknown{{info needed|What does this do?}}
|-
| {{code|--checkGlErrors}}
| unknown{{info needed|What does this do?}}
|-
| {{code|--renderDebugLabels}}
| unknown{{info needed|What does this do?}}
|-
| {{code|--vulkanValidation}}
| unknown{{info needed|What does this do?}}
|-
| {{code|--graphicsBackend {{ph|graphics backend}}}}
| Sets the graphics backend of Minecraft. One of {{code|default}}, {{code|opengl}}, or {{code|vulkan}}.
|-
| {{code|--jfrProfile}}
| Starts profiling with {{wp|JDK Flight Recorder}} on game launch.
|-
| {{code|--tracy}}
| Starts profiling with Tracy on game launch.
|-
| {{code|--tracyNoImages}}
| unknown{{info needed|What does this do?}}
|-
| {{code|--proxyHost {{ph|proxy host}}}}
| The optional host name of a proxy to route network traffic through.
|-
| {{code|--proxyPort {{ph|proxy port}}}}
| The optional port of a proxy to route network traffic through. Defaults to {{code|8080}}.
|-
| {{code|--proxyUser {{ph|proxy user name}}}}
| The optional user name of a proxy to route network traffic through.
|-
| {{code|--proxyPass {{ph|proxy password}}}}
| The optional password of a proxy to route network traffic through.
|-
| {{code|--offlineDeveloperMode}}
| Switches the game to offline developer mode.
|}
|}


Line 120: Line 168:
! Description
! Description
! Versions
! Versions
|-
| {{code|--tweakClass {{ph|tweaker class}}}}
| An optional class implementing {{code|net.minecraft.launchwrapper.ITweaker}} that can modify other classes while the game is starting.
The vanilla tweakers are in the {{code|net.minecraft.launchwrapper}} package, for example {{code|net.minecraft.launchwrapper.VanillaTweaker}}.
| presumable at least Indev to Alpha{{info needed|Which versions had these arguments?}}
|-
|-
| {{code|--session {{ph|session authentication}}}}
| {{code|--session {{ph|session authentication}}}}
| The session ID used to authenticate with Mojang while connecting to servers.
| The session ID used to authenticate with Mojang while connecting to servers.
Defined as: {{code|token:{{ph|access authentication token}}:{{ph|authentication UUID}}}}.
Defined as: {{code|token:{{ph|access authentication token}}:{{ph|authentication UUID}}}}.
| rowspan=4 | unknown{{info needed|Which versions had these arguments?}}
| [[Minecraft:13w16a]] to [[Minecraft:13w39b]]
|-
|-
| {{code|--userProperties {{ph|user properties}}}}
| {{code|--userProperties {{ph|user properties}}}}
|  unknown{{info needed|What did it do?}}
|  unknown{{info needed|What did it do?}}
| [[Minecraft:13w47a]] to [[Minecraft:25w31a]]
|-
| {{code|--profileProperties {{ph|profile properties}}}}
|  unknown{{info needed|What did it do?}}
| [[Minecraft:1.8.1-pre1]] to [[Minecraft:25w31a]]
|-
|-
| {{code|--server {{ph|server address}}}}
| {{code|--server {{ph|server address}}}}
| The same as the new {{code|--quickPlayMultiplayer {{ph|server address}}}}.
| The same as the new {{code|--quickPlayMultiplayer {{ph|server address}}}}.
| until [[Minecraft:23w13a]]
|-
|-
| {{code|--port {{ph|the port of the server}}}}
| {{code|--port {{ph|server port}}}}
| Used with {{code|--server}}
| The port of the server to automatically join once the game has started, usually {{code|25565}}.{{info needed|Can --quickPlayMultiplayerbe given a port?}}
| until [[Minecraft:23w13a]]
|-
|-
| {{code|--workDir {{ph|game folder}}}}
| {{code|--workDir {{ph|game folder}}}}
| The same as the new {{code|--gameDir {{ph|game folder}}}}.
| The same as the new {{code|--gameDir {{ph|game folder}}}}.
| 13w16a to 13w23b
| [[Minecraft:13w16a]] to [[Minecraft:13w23b]]
|-
| {{code|--dataPackDir {{ph|data pack folder}}}}
| {{info needed|What did it do?}}
| [[Minecraft:1.16-pre1]] to [[Minecraft:21w13a]]
|-
| {{code|--assetsDir {{ph|assets folder}}}}
| The assets folder. Presumably {{file|directory|[[Minecraft:.minecraft]]/assets/virtual/legacy}} by default.{{info needed|How did it differ from --assetsDir?}}
| until [[Minecraft:13w48b]]
|-
| {{code|--userType {{ph|authentication scheme}}}}
| The authentication scheme used for logging in.
{{code|msa}} for [[Minecraft:Microsoft authentication]]<br>
{{code|mojang}} for [[Minecraft:Yggdrasil|Yggdrasil (Legacy Mojang authentication)]]<br>
{{code|legacy}} for [[Minecraft:Legacy Minecraft authentication]]
| [[Minecraft:Java Edition 1.7.3|1.7.3]] to [[Minecraft:Java Edition 1.21.8|1.21.8]]
|}
 
== Launch wrapper arguments ==
Minecraft versions [[Minecraft:Java Edition 1.5.2|1.5.2]] and prior use a wrapper class to launch the game, which has different arguments than Minecraft itself. This is so they can be properly launched by the [[Minecraft:Minecraft Launcher]].
{| class = "wikitable"
|-
! Argument
! Description
|-
| {{code|--version {{ph|version}}}}
| The name of the version.
|-
| {{code|--gameDir {{ph|game folder}}}}
| The folder for the instance's files. {{file|directory|[[Minecraft:.minecraft]]}} by default.
|-
|-
| {{code|--assetsDir {{ph|assets folder}}}}
| {{code|--assetsDir {{ph|assets folder}}}}
| The assets folder, presumably {{file|directory|[[Minecraft:.minecraft]]/assets/virtual/legacy}}.{{info needed|How did it differ from --assetsDir?}}
| The folder that contains, among others, the {{file|directory|objects}} folder. {{file|directory|[[Minecraft:.minecraft]]/assets}} by default.
| until 13w48b
|-
| {{code|--tweakClass {{ph|tweaker class}}}}
| An optional class implementing {{code|net.minecraft.launchwrapper.ITweaker}} that can modify other classes while the game is starting.
The vanilla tweakers are in the {{code|net.minecraft.launchwrapper}} package, for example {{code|net.minecraft.launchwrapper.VanillaTweaker}}.
|-
|}
|}


Line 211: Line 294:


Before that, the game arguments were defined in [[Minecraft:client.json]] under {{code|minecraftArguments}} while the JVM arguments were defined directly in the launcher.
Before that, the game arguments were defined in [[Minecraft:client.json]] under {{code|minecraftArguments}} while the JVM arguments were defined directly in the launcher.
== History ==
{{HistoryTable
|{{HistoryLine|java classic}}
|{{HistoryLine||?|Added {{code|username}}, {{code|sessionid}}, {{code|loadmap_user}}, {{code|loadmap_id}}, and {{code|mppass}} as applet parameters.}}
|{{HistoryLine||?|Added {{code|server}} and {{code|port}} as applet parameters.}}
|{{HistoryLine||?|Added {{code|fullscreen}} as an applet parameter.}}
|{{HistoryLine|java beta}}
|{{HistoryLine||1.3b|Removed {{code|loadmap_user}} and {{code|loadmap_id}}.}}
|{{HistoryLine|java}}
|{{HistoryLine||1.0|Added {{code|stand-alone}} as an applet parameter.}}
|{{HistoryLine||1.3.1|dev=12w16a|Added {{code|demo}} as an applet parameter and {{code|--demo}} as a command line argument.}}
|{{HistoryLine|||dev=12w18a|Added {{code|--server-path}} and {{code|--server-entry}} as command line arguments.}}
|{{HistoryLine|||dev=12w19a|Added {{code|server-entry}} and {{code|server-loc}} as applet parameters.|Added {{code|--applet}} as a command line argument.|Removed {{code|mppass}}.}}
|{{HistoryLine|||dev=12w30a|Removed {{code|--server-path}}, {{code|--server-entry}}, {{code|server-entry}}, and {{code|server-loc}}.}}
|{{HistoryLine||1.4.2|dev=12w42a|Added {{code|--password}} as a command line argument.}}
|{{HistoryLine||1.6.1|dev=13w16a|Added {{code|--workDir}}, {{code|--proxyHost}}, {{code|--proxyPort}}, {{code|--proxyUser}}, {{code|--proxyPass}}, {{code|--username}} and {{code|--session}}.|Removed {{code|sessionid}}, {{code|stand-alone}}, {{code|--applet}} and {{code|--password}}.|Minecraft no longer uses a {{wp|Java Applet}}. As such, certain applet parameters were made command line arguments: <br>{{code|username}} to {{code|--username}}<br>{{code|server}} to {{code|--server}}<br>{{code|port}} to {{code|--port}}<br>{{code|fullscreen}} to {{code|--fullscreen}}<br>{{code|demo}} merged with {{code|--demo}}.}}
|{{HistoryLine|||dev=13w23a|Added {{code|--version}}.}}
|{{HistoryLine|||dev=13w24a|Added {{code|--gameDir}} and {{code|--assetsDir}}.|Removed {{code|--workDir}}.}}
|{{HistoryLine|||dev=13w25a|Added {{code|--width}} and {{code|--height}}.}}
|{{HistoryLine|||dev=13w25b|Added {{code|--resourcePackDir}}.}}
|{{HistoryLine||1.7.2|dev=13w36a|Added {{code|--uuid}}.}}
|{{HistoryLine|||dev=13w38a|Added {{code|--accessToken}}.}}
|{{HistoryLine|||dev=13w41a|Removed {{code|--session}}.}}
|{{HistoryLine||1.7.4|dev=13w47a|Added {{code|--userProperties}}.}}
|{{HistoryLine|||dev=13w49a|Added {{code|--assetIndex}}.}}
|{{HistoryLine|||dev=1.7.3|Added {{code|--userType}}.}}
|{{HistoryLine||1.8|dev=14w25a|Added {{code|--checkGlErrors}}.}}
|{{HistoryLine||1.8.1|dev=pre1|Added {{code|--profileProperties}}.}}
|{{HistoryLine||1.9|dev=16w05b|Added {{code|--versionType}}.}}
|{{HistoryLine||1.13|dev=17w43a|Added {{code|--fullscreenWidth}} and {{code|--fullscreenHeight}}.}}
|{{HistoryLine||1.16|dev=20w21a|Added {{code|--disableMultiplayer}} and {{code|--disableChat}}.}}
|{{HistoryLine|||dev=pre1|Added {{code|--dataPackDir}}.}}
|{{HistoryLine||1.17|dev=21w14a|Removed {{code|--dataPackDir}}.}}
|{{HistoryLine||1.18|dev=21w38a|Added {{code|--xuid}} and {{code|--clientId}}.}}
|{{HistoryLine||1.20|dev=23w14a|Added {{code|--quickPlayPath}}, {{code|--quickPlaySingleplayer}}, {{code|--quickPlayMultiplayer}}, and {{code|--quickPlayRealms}}.|Removed {{code|--server}} and {{code|--port}}.}}
|{{HistoryLine||1.21.2|dev=24w37a|Added {{code|--tracy}} and {{code|--tracyNoImages}}.}}
|{{HistoryLine||1.21.5|dev=25w09a|Added {{code|--renderDebugLabels}}.}}
|{{HistoryLine||1.21.6|dev=25w19a|{{code|--quickPlaySingleplayer}} can now be used without an identifier to launch into the last played world.}}
|{{HistoryLine||1.21.9|dev=25w31a|Added {{code|--offlineDeveloperMode}}.|Removed {{code|--userType}}.}}
|{{HistoryLine|||dev=25w32a|Removed {{code|--userProperties}} and {{code|--profileProperties}}.}}
|{{HistoryLine||26.2|dev=snap1|Added {{code|--vulkanValidation}}.}}
|{{HistoryLine|||dev=snap2|Added {{code|--graphicsBackend}}.}}
}}


== References ==
== References ==

Revision as of 11:19, 24 June 2026

Template:Italic title When starting the Minecraft:Java Edition client, the Minecraft:Minecraft Launcher passes various command line arguments to the Template:Wp, such as the path to the game itself and account login information. These arguments are chosen based on the contents of the Template:Mono file corresponding to the selected version, options set in the launcher, and the current operating system.

Command line parts

The complete command line used to start the JVM consists of the following parts:

JVM arguments

Argument Description
Template:Code The path to the native libraries.
Template:Code The path Template:Wp uses for temporary files.
Template:Code The path containing Template:Wp.
Template:Code The path Template:Wp uses.
Template:Code The name of the launcher.Template:Info needed
Template:Code The version of the launcher.Template:Info needed
Template:Code The absolute paths listing the game and library jars to load, separated by Template:Code on Windows or Template:Code on Linux and macOS.
Template:Code Tells the JVM to start on the first thread.
Some macOS versions require this while others break with it, leaving the game stuck as "not responding".
Template:Code Supposedly makes Intel drivers on laptops with two GPUs use the dedicated GPU.<ref>Template:Reddit</ref>
Template:Code Sets the per thread stack size to 1 MB.

Game arguments

Argument Description
Template:Code The optional base64 encoded Minecraft:UUID from Template:File in Minecraft:.minecraft used for Minecraft:telemetry. The file is generated by the launcher if it's missing.
Template:Code The player's name used for offline mode.Template:Info needed
Template:Code The player's UUID.
Template:Code The player's Xbox User ID.
Template:Code The token generated during the login, required for joining servers. The format depends on the authentication scheme.
Template:Code Switches the game to Minecraft:Demo Mode.
Template:Code The name of the version. Specified in Minecraft:client.json and Minecraft:version_manifest.json under Template:Code. Shown in the Minecraft:debug screen and in crash reports.
Template:Code The type of the version. Usually Template:Code, Template:Code, Template:Code or Template:Code, specified in Minecraft:client.json and Minecraft:version_manifest.json under Template:Code. Shown in the Minecraft:debug screen and in crash reports.
Template:Code The folder for the instance's files. Template:File by default.
Template:Code The folder that contains, among others, the Template:File folder. Template:File by default.
Template:Code The folder for resource packs. Template:File by default.
Template:Code The JSON file for mapping internal names to indexes into the Template:File folder. Template:File by default.
Template:Code The initial width of the game's window. Template:Code by default.
Template:Code The initial height of the game's window. Template:Code by default.
Template:Code Disables the multiplayer button.
Template:Code Disables sending and receiving chat messages.
Template:Code The optional path from the Minecraft:.minecraft folder to the Minecraft:quick play logs file.
Template:Code The optional name of the world to automatically join once the game has started. A blank name joins the most recently played world.
Template:Code The optional address of a server to automatically join once the game has started.Template:Info needed
Template:Code The optional ID of a realm to automatically join once the game has started.
Template:Code Launches the game directly into fullscreen.
Template:Code unknownTemplate:Info needed
Template:Code unknownTemplate:Info needed
Template:Code unknownTemplate:Info needed
Template:Code unknownTemplate:Info needed
Template:Code unknownTemplate:Info needed
Template:Code Sets the graphics backend of Minecraft. One of Template:Code, Template:Code, or Template:Code.
Template:Code Starts profiling with Template:Wp on game launch.
Template:Code Starts profiling with Tracy on game launch.
Template:Code unknownTemplate:Info needed
Template:Code The optional host name of a proxy to route network traffic through.
Template:Code The optional port of a proxy to route network traffic through. Defaults to Template:Code.
Template:Code The optional user name of a proxy to route network traffic through.
Template:Code The optional password of a proxy to route network traffic through.
Template:Code Switches the game to offline developer mode.

Legacy arguments

Argument Description Versions
Template:Code The session ID used to authenticate with Mojang while connecting to servers.

Defined as: Template:Code.

Minecraft:13w16a to Minecraft:13w39b
Template:Code unknownTemplate:Info needed Minecraft:13w47a to Minecraft:25w31a
Template:Code unknownTemplate:Info needed Minecraft:1.8.1-pre1 to Minecraft:25w31a
Template:Code The same as the new Template:Code. until Minecraft:23w13a
Template:Code The port of the server to automatically join once the game has started, usually Template:Code.Template:Info needed until Minecraft:23w13a
Template:Code The same as the new Template:Code. Minecraft:13w16a to Minecraft:13w23b
Template:Code Template:Info needed Minecraft:1.16-pre1 to Minecraft:21w13a
Template:Code The assets folder. Presumably Template:File by default.Template:Info needed until Minecraft:13w48b
Template:Code The authentication scheme used for logging in.

Template:Code for Minecraft:Microsoft authentication
Template:Code for Yggdrasil (Legacy Mojang authentication)
Template:Code for Minecraft:Legacy Minecraft authentication

1.7.3 to 1.21.8

Launch wrapper arguments

Minecraft versions 1.5.2 and prior use a wrapper class to launch the game, which has different arguments than Minecraft itself. This is so they can be properly launched by the Minecraft:Minecraft Launcher.

Argument Description
Template:Code The name of the version.
Template:Code The folder for the instance's files. Template:File by default.
Template:Code The folder that contains, among others, the Template:File folder. Template:File by default.
Template:Code An optional class implementing Template:Code that can modify other classes while the game is starting.

The vanilla tweakers are in the Template:Code package, for example Template:Code.

Main class

A versions default main class is in it's Minecraft:version.json under Template:Code.

Class Versions
Template:Code after 1.5.2
Template:Code Alpha 1.0.11 to 1.5.2 new launcher
Template:Code old launcher
Template:Code start of Alpha to Alpha 1.0.5_01 launcher
Template:Code Alpha website applet
Template:Code Indev and Infdev launcher
Template:Code website applet
Template:Code Classic 0.0.13a_03 to end of Classic launcher
Template:Code start of Classic to Classic 0.0.13a
Template:Code Classic website applet
Template:Code late pre-Classic
Template:Code early pre-Classic

Assets

Template:Main article

The launcher downloads additional required resources and saves them to Template:File to be used by the game.

Minecraft requires several arguments when launched.

Since 1.12.2, they are defined in Minecraft:client.json under Template:Code.

Before that, the game arguments were defined in Minecraft:client.json under Template:Code while the JVM arguments were defined directly in the launcher.

History

Template:HistoryTable

References

Template:Reflist