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: new page from Minecraft
 
SyncBot (talk | contribs)
Sync: updated from Minecraft
 
(3 intermediate revisions by the same user not shown)
Line 4: Line 4:
== Command line parts ==
== Command line parts ==


The complete command line used to start the JVM consists of the following parts:
The complete command used to start the {{wp|Java virtual machine}} consists of the following parts:


* Location of the JVM executable. Defaults either to a JVM provided by the system, or a JVM automatically downloaded by the launcher. May be changed in [[Minecraft:Minecraft Launcher#Installations|installation options]] in the launcher.
* Location of the JVM executable, usually provided by the system or downloaded by the launcher. Can be changed in the [[Minecraft:Minecraft Launcher#Installations|installation options]] in the launcher.
* Arguments to configure the JVM, such as {{code|-cp}} (classpath) to specify the locations of required libraries and the main {{mono|client.jar}}. Generated based on {{code|arguments.jvm}} in {{mono|[[Minecraft:client.json]]}}.
* [[#JVM arguments|JVM arguments]] generated by the launcher and partially specified in its [[Minecraft:Minecraft Launcher#Installations|installation options]].
* Additional JVM arguments specified in [[Minecraft:Minecraft Launcher#Installations|installation options]] in the launcher.
* {{code|-cp}}, which stands for "classpath".
* Name of the main class. Specified as {{code|mainClass}} in {{mono|[[Minecraft:client.json]]}}.
* The paths to the required libraries and the [[Minecraft:client.jar]], separated by {{code|:}} on Linux and macOS and with {{code|;}} on Windows. Generated based on {{code|arguments.jvm}} in [[Minecraft:client.json]].
* Arguments to the game itself, such as {{code|--gameDir}} to specify the base directory for user-generated game files. Generated based on {{code|arguments.game}} in {{mono|[[Minecraft:client.json]]}}.
* The [[#Main class|main class]], specified as {{code|mainClass}} in [[Minecraft:client.json]].
* Additional game arguments specified in [[Minecraft:Minecraft Launcher#Installations|installation options]] in the launcher.
* [[#Game arguments|Game arguments]] generated by the launcher based on {{code|arguments.game}} in [[Minecraft:client.json]].


== JVM arguments ==
== JVM arguments ==
Line 19: Line 19:
! Description
! Description
|-
|-
| {{code|-Djava.library.path{{=}}{{ph|natives folder}}}}
| {{code|-Djava.library.path{{=}}{{ph|library natives folder}}}}
| The path to the native libraries.
| Sets the folder containing the library natives. Usually {{file|directory|[[Minecraft:.minecraft]]/bin/{{ph|natives folder}}/java}}.
|-
|-
| {{code|-cp {{ph|jars}}}}
| {{code|-Djna.tmpdir{{=}}{{ph|JNA temporary folder}}}}
| The absolute paths listing the game and library jars to load, separated by {{code|;}} on Windows or {{code|:}} on Linux and macOS.
| Sets the folder {{wp|Java Native Access}} uses for temporary files. Usually {{file|directory|[[Minecraft:.minecraft]]/bin/{{ph|natives folder}}/jna}}.
|-
| {{code|-Dorg.lwjgl.system.SharedLibraryExtractPath{{=}}{{ph|LWJGL natives folder}}}}
| Sets the folder containing the {{wp|LWJGL}} natives. Usually {{file|directory|[[Minecraft:.minecraft]]/bin/{{ph|natives folder}}/lwjgl}}.
|-
| {{code|-Dio.netty.native.workdir{{=}}{{ph|Netty natives folder}}}}
| Sets the folder containing the {{wp|Netty (software)|Netty}} natives. Usually {{file|directory|[[Minecraft:.minecraft]]/bin/{{ph|natives folder}}/netty}}.
|-
|-
| {{code|-Dminecraft.launcher.brand{{=}}{{ph|launcher name}}}}
| {{code|-Dminecraft.launcher.brand{{=}}{{ph|launcher name}}}}
| The name of the launcher.{{info needed|What does the game use this information for?}}
| Sets the name of the launcher. Included in crash reports and telemetry.
|-
|-
| {{code|-Dminecraft.launcher.version{{=}}{{ph|launcher version}}}}
| {{code|-Dminecraft.launcher.version{{=}}{{ph|launcher version}}}}
| The version of the launcher.{{info needed|What does the game use this information for?}}
| Sets the version of the launcher. Ignored by the game.
|-
| {{code|-Dos.name{{=}}Windows 10 -Dos.version{{=}}10.0}}
| Tells Java to state that it is running on Windows 10 even when it's not.{{info needed|Why and when is this used?}}
|-
|-
| {{code|-XX:HeapDumpPath{{=}}MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump}}
| {{code|-XX:HeapDumpPath{{=}}MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump}}
Line 40: Line 43:
| 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".
| 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|-Xms{{ph|initial memory}}}}
| Sets the per thread stack size to 1 MB.
| Sets the initial memory used in bytes.
|-
| {{code|-Xmx{{ph|maximum memory}}}}
| Sets the maximum memory used in bytes.
|-
| {{code|-Xss{{ph|stack memory}}}}
| Sets the memory used for the stack in bytes.
|}
|}
All byte counts can be suffixed with {{code|K}} for kilobytes, {{code|M}} for megabytes or {{code|G}} for gigabytes, each of which is equivalent to 1024 of the previous.


== Game arguments ==
== Game arguments ==
Line 50: Line 60:
! Description
! Description
|-
|-
| {{code|--clientId {{ph|client ID}}}}
| {{code|--version {{ph|version name}}}}
| The optional base64 encoded [[Minecraft:UUID]] from {{file|file|clientId.txt}} in [[Minecraft:.minecraft]] used for [[Minecraft:telemetry]]. The file is generated by the launcher if it's missing.
| Sets the name of the version. Required to start the game. Specified in [[Minecraft:client.json]] and [[Minecraft:version_manifest.json]] under {{code|id}}. Shown in the [[Minecraft:debug screen]] and in crash reports.
|-
| {{code|--versionType {{ph|version type}}}}
| Sets the type of the version. Usually {{code|release}}, {{code|snapshot}}, {{code|old_beta}} or {{code|old_alpha}}, specified in [[Minecraft:client.json]] and [[Minecraft:version_manifest.json]] under {{code|type}}. Defaults to {{code|release}}.
|-
| {{code|--accessToken {{ph|access token}}}}
| Sets the token generated during the login. Required to start the game. An invalid token will allow singleplayer but show any error when attempting to join a server. The format depends on the authentication scheme.
|-
|-
| {{code|--username {{ph|player name}}}}
| {{code|--username {{ph|player name}}}}
| The player's name used for offline mode.{{info needed|Is it used in online mode?}}
| Sets the player's name used for singleplayer. Must match the name of the account for multiplayer. Defaults to {{code|Player}} followed by the millisecond component of the current system time, which is essentially a random integer from {{code|0}} to {{code|999}}.
|-
|-
| {{code|--uuid {{ph|UUID}}}}
| {{code|--uuid {{ph|UUID}}}}
| The player's UUID.
| Sets the player's UUID. Hyphens are optional. If the access token is valid, then the UUID must match that account for both singleplayer and multiplayer. Defaults to a UUID generated from the player's name.
|-
|-
| {{code|--xuid {{ph|XUID}}}}
| {{code|--xuid {{ph|XUID}}}}
| The Xbox User ID.
| Sets 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}}}}
| The token generated during the login, required for joining servers. The format depends on the authentication scheme.
|-
|-
| {{code|--demo}}
| {{code|--demo}}
| Switches the game to [[Minecraft:Demo Mode]].
| Switches the game to [[Minecraft:demo mode]].
|-
|-
| {{code|--version {{ph|version name}}}}
| {{code|--offlineDeveloperMode}}
| The name of the version. Specified in [[Minecraft:client.json]] and [[Minecraft:version_manifest.json]] under {{code|id}}. Shown in the [[Minecraft:debug screen]] and in crash reports.
| Switches the game to offline developer mode.
|-
|-
| {{code|--versionType {{ph|version type}}}}
| {{code|--clientId {{ph|client ID}}}}
| The type of the version. Usually {{code|release}}, {{code|snapshot}}, {{code|old_beta}} or {{code|old_alpha}}, specified in [[Minecraft:client.json]] and [[Minecraft:version_manifest.json]] under {{code|type}}. Shown in the [[Minecraft:debug screen]] and in crash reports.  
| Sets the ID included in [[Minecraft:telemetry]]. Usually the [[Minecraft:UUID]] from {{file|file|clientId_v2.txt}} in [[Minecraft:.minecraft]], encoded as base64. Defaults to not including an ID in the telemetry data.
|-
|-
| {{code|--gameDir {{ph|game folder}}}}
| {{code|--gameDir {{ph|game folder}}}}
| The folder for the instance's files. {{file|directory|[[Minecraft:.minecraft]]}} by default.
| Sets the folder for the instance's files. Usually {{file|directory|[[Minecraft:.minecraft]]}}. Defaults to the current working directory.
|-
|-
| {{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.
| Sets the folder that contains, among others, the {{file|directory|objects}} folder. Usually {{file|directory|[[Minecraft:.minecraft]]/assets}}. Defaults to {{file|directory|assets}} in the instance's files.
|-
| {{code|--resourcePackDir {{ph|resource pack folder}}}}
| Sets the folder for resource packs. Defaults to {{file|directory|resourcepacks}} in the instance's files.
|-  
|-  
| {{code|--assetIndex {{ph|assets index name}}}}
| {{code|--assetIndex {{ph|assets index name}}}}
| The JSON file for mapping internal names to indexes into the {{file|directory|assets/objects}} folder. {{file|directory|[[Minecraft:.minecraft]]/assets/indexes/{{ph|version}}.json}} by default.
| Sets the name (without {{code|.json}}) of the JSON file located in {{file|directory|indexes}} in the assets folder to use for mapping internal names to indexes into the {{file|directory|assets/objects}} folder. The index name depends on the game's version.{{info needed|How exactly do game version and index name relate? It used to be the version's name, but now it's just a single integer. It might be incremented with each version, but I'm not sure.}}
|-
|-
| {{code|--width {{ph|width}}}}
| {{code|--width {{ph|width}}}}
| The initial width of the game's window.
| Sets the initial width of the game's window. Defaults to {{code|854}}.
|-
|-
| {{code|--height {{ph|height}}}}
| {{code|--height {{ph|height}}}}
| The initial height of the game's window.
| Sets the initial height of the game's window. Defaults to {{code|480}}.
|-
| {{code|--fullscreen}}
| Enables fullscreen.
|-
| {{code|--fullscreenWidth {{ph|horizontal fullscreen resolution}}}}
| rowspan=2 | Set fullscreen resolution to use and store in the [[Minecraft:options]] when starting the game for the first time. Must be one of the resolutions selectable with the in-game slider.
|-
| {{code|--fullscreenHeight {{ph|vertical fullscreen resolution}}}}
|-
|-
| {{code|--disableMultiplayer}}
| {{code|--disableMultiplayer}}
| Disables the multiplayer button.
| Disables the multiplayer and realms buttons.
|-
|-
| {{code|--disableChat}}
| {{code|--disableChat}}
| Disables sending and receiving chat messages.
| Disables sending and seeing public and private messages in multiplayer and worlds opened to LAN. Commands and server messages are allowed.<br>Most servers send player messages as server messages, reimplement private messages, and sometimes even offer commands to send public messages, which mostly or entirely nullifies this argument.
|-
| {{code|--quickPlaySingleplayer [{{ph|world folder name}}]}}
| Automatically joins the singleplayer world once the game has started. Defaults to the most recently played world if the folder name is omitted.
|-
| {{code|--quickPlayMultiplayer {{ph|server address}}}}
| Automatically joins the server once the game has started.
|-
| {{code|--quickPlayRealms {{ph|Realm ID}}}}
| Automatically joins the Realm once the game has started.
|-
|-
| {{code|--quickPlayPath {{ph|quick play logs path}}}}
| {{code|--quickPlayPath {{ph|quick play logs path}}}}
| The optional path from the [[Minecraft:.minecraft]] folder to the [[Minecraft:quick play]] logs file.
| Sets the path to the file to write [[Minecraft:Quick Play#Logs|Quick Play logs]] to, relative to the instance's files.
|-
| {{code|--checkGlErrors}}
| Does nothing. It is accepted and ignored.
|-
| {{code|--renderDebugLabels}}
| Names GPU calls to make them identifiable in debugging.
|-
| {{code|--vulkanValidation}}
| Detects Vulkan errors instead of ignoring them and enables render debug labels.
|-
| {{code|--graphicsBackend {{ph|graphics backend}}}}
| Sets the graphics backend of Minecraft. Must be {{code|default}}, {{code|opengl}} or {{code|vulkan}}. Defaults to {{code|default}}.
|-
|-
| {{code|--quickPlaySingleplayer {{ph|world name}}}}
| {{code|--jfrProfile}}
| The optional name of the world to automatically join once the game has started.
| Starts profiling with {{wp|JDK Flight Recorder}} on game launch.
|-
|-
| {{code|--quickPlayMultiplayer {{ph|server address}}}}
| {{code|--tracy}}
| The optional address of a server to automatically join once the game has started.
| Starts profiling with Tracy on game launch.
|-
| {{code|--tracyNoImages}}
| Disables capturing frames to display in the timeline when debugging with Tracy.
|-
| {{code|--proxyHost {{ph|proxy host}}}}
| Routes traffic through a proxy.
|-
| {{code|--proxyPort {{ph|proxy port}}}}
| Sets the port of the proxy. Defaults to {{code|8080}}.
|-
| {{code|--proxyUser {{ph|proxy username}}}}
| rowspan=2 | Set the authentication for the used proxy. Required for multiplayer when using a proxy.
|-
|-
| {{code|--quickPlayRealms {{ph|realm ID}}}}
| {{code|--proxyPass {{ph|proxy password}}}}
| The optional ID of a realm to automatically join once the game has started.
|}
|}


Line 120: Line 170:
! 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.<br>Defined as: {{code|token:{{ph|access authentication token}}:{{ph|authentication UUID}}}}.
Defined as: {{code|token:{{ph|access authentication token}}:{{ph|authentication UUID}}}}.
| [[Minecraft:13w16a]] to [[Minecraft:13w39b]]
| rowspan=3 | unknown{{info needed|Which versions had these arguments?}}
|-
|-
| {{code|--userProperties {{ph|user properties}}}}
| {{code|--userProperties {{ph|user properties}}}}
| unknown{{info needed|What did it do?}}
| [[Minecraft:13w47a]] to [[Minecraft:25w31a]]
|-
| {{code|--profileProperties {{ph|profile properties}}}}
|  unknown{{info needed|What did it do?}}
|  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}}}}.
| rowspan=2 | The same as the new {{code|--quickPlayMultiplayer {{ph|server address}}[:{{ph|server port}}]}}.
| rowspan=2 | until [[Minecraft:23w13a]]
|-
| {{code|--port {{ph|server port}}}}
|-
|-
| {{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}}}}
| Did nothing. It was accepted and ignored.
| [[Minecraft:1.16-pre1]] to [[Minecraft:21w13a]]
|-
|-
| {{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 assets folder. Presumably {{file|directory|[[Minecraft:.minecraft]]/assets/virtual/legacy}} by default.{{info needed|How did it differ from --assetsDir?}}
| until 13w48b
| 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}}}}
| The folder that contains, among others, the {{file|directory|objects}} folder. {{file|directory|[[Minecraft:.minecraft]]/assets}} by default.
|-
| {{code|--tweakClass {{ph|tweaker class}}}}
| An optional class implementing {{code|net.minecraft.launchwrapper.ITweaker}} that can modify other classes while the game is starting.<br>The vanilla tweakers are in the {{code|net.minecraft.launchwrapper}} package, for example {{code|net.minecraft.launchwrapper.VanillaTweaker}}.
|-
|}
|}


== Main class ==
== Main class ==


A versions default main class is in it's [[Minecraft:version.json]] under {{code|mainClass}}.
A version's default main class is in its [[Minecraft:version.json]] under {{code|mainClass}}.


{| class="wikitable"
{| class="wikitable"
|-  
|-  
! Class
! Class
! colspan=2 | Versions
! Versions
! Source
|-
|-
| {{code|net.minecraft.client.main.Main}}
| {{code|net.minecraft.client.main.Main}}
| colspan=2 | after 1.5.2
| colspan=2 | after [[Minecraft:Java Edition 1.5.2|release 1.5.2]]
|-
|-
| {{code|net.minecraft.launchwrapper.Launch}}
| {{code|net.minecraft.launchwrapper.Launch}}
| rowspan=2 | Alpha 1.0.11 to 1.5.2
| rowspan=2 | [[Minecraft:Alpha v1.0.11]] through release 1.5.2
| new launcher
| [[Minecraft:Minecraft Launcher|new launcher]]
|-
|-
| {{code|net.minecraft.client.Minecraft}}
| {{code|net.minecraft.client.Minecraft}}
Line 166: Line 251:
|-
|-
| {{code|{{ph|obfuscated}}}}
| {{code|{{ph|obfuscated}}}}
| start of Alpha to Alpha 1.0.5_01
| start of Alpha through [[Minecraft:Alpha v1.0.5_01]]
| launcher  
| launcher  
|-
|-
| {{code|net.minecraft.client.MinecraftApplet}}
| {{code|net.minecraft.client.MinecraftApplet}}
| Alpha
| Alpha
| website applet
| website [[Minecraft:applet]]
|-
|-
| {{code|net.minecraft.minecraft.{{ph|obfuscated}}}}
| {{code|net.minecraft.minecraft.{{ph|obfuscated}}}}
Line 181: Line 266:
|-
|-
| {{code|com.mojang.minecraft.{{ph|obfuscated}}}}
| {{code|com.mojang.minecraft.{{ph|obfuscated}}}}
| Classic 0.0.13a_03 to end of Classic
| [[Minecraft:Classic 0.0.13a_03]] through end of Classic
| rowspan=2 | launcher  
| rowspan=2 | launcher  
|-
|-
| {{code|com.mojang.minecraft.Minecraft}}
| {{code|com.mojang.minecraft.Minecraft}}
| start of Classic to Classic 0.0.13a
| start of Classic through Classic 0.0.13a
|-
|-
| {{code|com.mojang.minecraft.MinecraftApplet}}
| {{code|com.mojang.minecraft.MinecraftApplet}}
Line 192: Line 277:
|-
|-
| {{code|com.mojang.minecraft.RubyDung}}
| {{code|com.mojang.minecraft.RubyDung}}
| colspan=2 | late pre-Classic
| colspan=2 | late [[Minecraft:pre-Classic]]
|-
|-
| {{code|com.mojang.rubydung.RubyDung}}
| {{code|com.mojang.rubydung.RubyDung}}
Line 208: Line 293:


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 ==

Latest revision as of 11:12, 26 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 used to start the Template:Wp consists of the following parts:

JVM arguments

Argument Description
Template:Code Sets the folder containing the library natives. Usually Template:File.
Template:Code Sets the folder Template:Wp uses for temporary files. Usually Template:File.
Template:Code Sets the folder containing the Template:Wp natives. Usually Template:File.
Template:Code Sets the folder containing the Template:Wp natives. Usually Template:File.
Template:Code Sets the name of the launcher. Included in crash reports and telemetry.
Template:Code Sets the version of the launcher. Ignored by the game.
Template:Code Supposedly makes Intel drivers on laptops with two GPUs use the dedicated GPU.<ref>Template:Reddit</ref>
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 Sets the initial memory used in bytes.
Template:Code Sets the maximum memory used in bytes.
Template:Code Sets the memory used for the stack in bytes.

All byte counts can be suffixed with Template:Code for kilobytes, Template:Code for megabytes or Template:Code for gigabytes, each of which is equivalent to 1024 of the previous.

Game arguments

Argument Description
Template:Code Sets the name of the version. Required to start the game. 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 Sets 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. Defaults to Template:Code.
Template:Code Sets the token generated during the login. Required to start the game. An invalid token will allow singleplayer but show any error when attempting to join a server. The format depends on the authentication scheme.
Template:Code Sets the player's name used for singleplayer. Must match the name of the account for multiplayer. Defaults to Template:Code followed by the millisecond component of the current system time, which is essentially a random integer from Template:Code to Template:Code.
Template:Code Sets the player's UUID. Hyphens are optional. If the access token is valid, then the UUID must match that account for both singleplayer and multiplayer. Defaults to a UUID generated from the player's name.
Template:Code Sets the player's Xbox User ID.
Template:Code Switches the game to Minecraft:demo mode.
Template:Code Switches the game to offline developer mode.
Template:Code Sets the ID included in Minecraft:telemetry. Usually the Minecraft:UUID from Template:File in Minecraft:.minecraft, encoded as base64. Defaults to not including an ID in the telemetry data.
Template:Code Sets the folder for the instance's files. Usually Template:File. Defaults to the current working directory.
Template:Code Sets the folder that contains, among others, the Template:File folder. Usually Template:File. Defaults to Template:File in the instance's files.
Template:Code Sets the folder for resource packs. Defaults to Template:File in the instance's files.
Template:Code Sets the name (without Template:Code) of the JSON file located in Template:File in the assets folder to use for mapping internal names to indexes into the Template:File folder. The index name depends on the game's version.Template:Info needed
Template:Code Sets the initial width of the game's window. Defaults to Template:Code.
Template:Code Sets the initial height of the game's window. Defaults to Template:Code.
Template:Code Enables fullscreen.
Template:Code Set fullscreen resolution to use and store in the Minecraft:options when starting the game for the first time. Must be one of the resolutions selectable with the in-game slider.
Template:Code
Template:Code Disables the multiplayer and realms buttons.
Template:Code Disables sending and seeing public and private messages in multiplayer and worlds opened to LAN. Commands and server messages are allowed.
Most servers send player messages as server messages, reimplement private messages, and sometimes even offer commands to send public messages, which mostly or entirely nullifies this argument.
Template:Code Automatically joins the singleplayer world once the game has started. Defaults to the most recently played world if the folder name is omitted.
Template:Code Automatically joins the server once the game has started.
Template:Code Automatically joins the Realm once the game has started.
Template:Code Sets the path to the file to write Quick Play logs to, relative to the instance's files.
Template:Code Does nothing. It is accepted and ignored.
Template:Code Names GPU calls to make them identifiable in debugging.
Template:Code Detects Vulkan errors instead of ignoring them and enables render debug labels.
Template:Code Sets the graphics backend of Minecraft. Must be Template:Code, Template:Code or Template:Code. Defaults to Template:Code.
Template:Code Starts profiling with Template:Wp on game launch.
Template:Code Starts profiling with Tracy on game launch.
Template:Code Disables capturing frames to display in the timeline when debugging with Tracy.
Template:Code Routes traffic through a proxy.
Template:Code Sets the port of the proxy. Defaults to Template:Code.
Template:Code Set the authentication for the used proxy. Required for multiplayer when using a proxy.
Template:Code

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
Template:Code The same as the new Template:Code. Minecraft:13w16a to Minecraft:13w23b
Template:Code Did nothing. It was accepted and ignored. 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 version's default main class is in its Minecraft:version.json under Template:Code.

Class Versions Source
Template:Code after release 1.5.2
Template:Code Minecraft:Alpha v1.0.11 through release 1.5.2 new launcher
Template:Code old launcher
Template:Code start of Alpha through Minecraft:Alpha v1.0.5_01 launcher
Template:Code Alpha website Minecraft:applet
Template:Code Indev and Infdev launcher
Template:Code website applet
Template:Code Minecraft:Classic 0.0.13a_03 through end of Classic launcher
Template:Code start of Classic through Classic 0.0.13a
Template:Code Classic website applet
Template:Code late Minecraft: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