![]() |
VOOZH | about |
When starting the Java Edition client, the Minecraft Launcher passes various command line arguments to the Java virtual machine, such as the path to the game itself and account login information. These arguments are chosen based on the contents of the client.json file corresponding to the selected version, options set in the launcher, and the current operating system.
The complete command used to start the Java virtual machine consists of the following parts:
-cp, which stands for "classpath".: on Linux and macOS and with ; on Windows. Generated based on arguments.jvm in client.json.mainClass in client.json.arguments.game in client.json.| Argument | Description |
|---|---|
-Djava.library.path=<library natives folder>
|
Sets the folder containing the library natives. Usually ๐ File directory.png: Sprite image for directory in Minecraft .minecraft/bin/<natives folder>/java. |
-Djna.tmpdir=<JNA temporary folder>
|
Sets the folder Java Native Access uses for temporary files. Usually ๐ File directory.png: Sprite image for directory in Minecraft .minecraft/bin/<natives folder>/jna. |
-Dorg.lwjgl.system.SharedLibraryExtractPath=<LWJGL natives folder>
|
Sets the folder containing the LWJGL natives. Usually ๐ File directory.png: Sprite image for directory in Minecraft .minecraft/bin/<natives folder>/lwjgl. |
-Dio.netty.native.workdir=<Netty natives folder>
|
Sets the folder containing the Netty natives. Usually ๐ File directory.png: Sprite image for directory in Minecraft .minecraft/bin/<natives folder>/netty. |
-Dminecraft.launcher.brand=<launcher name>
|
Sets the name of the launcher. Included in crash reports and telemetry. |
-Dminecraft.launcher.version=<launcher version>
|
Sets the version of the launcher. Ignored by the game. |
-XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump
|
Supposedly makes Intel drivers on laptops with two GPUs use the dedicated GPU.[1] |
-XstartOnFirstThread
|
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". |
-Xms<initial memory>
|
Sets the initial memory used in bytes. |
-Xmx<maximum memory>
|
Sets the maximum memory used in bytes. |
-Xss<stack memory>
|
Sets the memory used for the stack in bytes. |
All byte counts can be suffixed with K for kilobytes, M for megabytes or G for gigabytes, each of which is equivalent to 1024 of the previous.
| Argument | Description |
|---|---|
--version <version name>
|
Sets the name of the version. Required to start the game. Specified in client.json and version_manifest.json under id. Shown in the debug screen and in crash reports.
|
--versionType <version type>
|
Sets the type of the version. Usually release, snapshot, old_beta or old_alpha, specified in client.json and version_manifest.json under type. Defaults to release.
|
--accessToken <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. |
--username <player name>
|
Sets the player's name used for singleplayer. Must match the name of the account for multiplayer. Defaults to Player followed by the millisecond component of the current system time, which is essentially a random integer from 0 to 999.
|
--uuid <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. |
--xuid <XUID>
|
Sets the player's Xbox User ID. |
--demo
|
Switches the game to demo mode. |
--offlineDeveloperMode
|
Switches the game to offline developer mode. |
--clientId <client ID>
|
Sets the ID included in telemetry. Usually the UUID from ๐ File file.png: Sprite image for file in Minecraft clientId_v2.txt in .minecraft, encoded as base64. Defaults to not including an ID in the telemetry data. |
--gameDir <game folder>
|
Sets the folder for the instance's files. Usually ๐ File directory.png: Sprite image for directory in Minecraft .minecraft. Defaults to the current working directory. |
--assetsDir <assets folder>
|
Sets the folder that contains, among others, the ๐ File directory.png: Sprite image for directory in Minecraft objects folder. Usually ๐ File directory.png: Sprite image for directory in Minecraft .minecraft/assets. Defaults to ๐ File directory.png: Sprite image for directory in Minecraft assets in the instance's files. |
--resourcePackDir <resource pack folder>
|
Sets the folder for resource packs. Defaults to ๐ File directory.png: Sprite image for directory in Minecraft resourcepacks in the instance's files. |
--assetIndex <assets index name>
|
Sets the name (without .json) of the JSON file located in ๐ File directory.png: Sprite image for directory in Minecraftindexes in the assets folder to use for mapping internal names to indexes into the ๐ File directory.png: Sprite image for directory in Minecraft assets/objects folder. The index name depends on the game's version.โ[more information needed] |
--width <width>
|
Sets the initial width of the game's window. Defaults to 854.
|
--height <height>
|
Sets the initial height of the game's window. Defaults to 480.
|
--fullscreen
|
Enables fullscreen. |
--fullscreenWidth <horizontal fullscreen resolution>
|
Set fullscreen resolution to use and store in the options when starting the game for the first time. Must be one of the resolutions selectable with the in-game slider. |
--fullscreenHeight <vertical fullscreen resolution>
| |
--disableMultiplayer
|
Disables the multiplayer and realms buttons. |
--disableChat
|
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. |
--quickPlaySingleplayer [<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. |
--quickPlayMultiplayer <server address>
|
Automatically joins the server once the game has started. |
--quickPlayRealms <Realm ID>
|
Automatically joins the Realm once the game has started. |
--quickPlayPath <quick play logs path>
|
Sets the path to the file to write Quick Play logs to, relative to the instance's files. |
--checkGlErrors
|
Does nothing. It is accepted and ignored. |
--renderDebugLabels
|
Names GPU calls to make them identifiable in debugging. |
--vulkanValidation
|
Detects Vulkan errors instead of ignoring them and enables render debug labels. |
--graphicsBackend <graphics backend>
|
Sets the graphics backend of Minecraft. Must be default, opengl or vulkan. Defaults to default.
|
--jfrProfile
|
Starts profiling with JDK Flight Recorder on game launch. |
--tracy
|
Starts profiling with Tracy on game launch. |
--tracyNoImages
|
Disables capturing frames to display in the timeline when debugging with Tracy. |
--proxyHost <proxy host>
|
Routes traffic through a proxy. |
--proxyPort <proxy port>
|
Sets the port of the proxy. Defaults to 8080.
|
--proxyUser <proxy username>
|
Set the authentication for the used proxy. Required for multiplayer when using a proxy. |
--proxyPass <proxy password>
|
| Argument | Description | Versions |
|---|---|---|
--session <session authentication>
|
The session ID used to authenticate with Mojang while connecting to servers. Defined as: token:<access authentication token>:<authentication UUID>.
|
13w16a to 13w39b |
--userProperties <user properties>
|
unknownโ[more information needed] | 13w47a to 25w31a |
--profileProperties <profile properties>
|
unknownโ[more information needed] | 1.8.1-pre1 to 25w31a |
--server <server address>
|
The same as the new --quickPlayMultiplayer <server address>[:<server port>].
|
until 23w13a |
--port <server port>
| ||
--workDir <game folder>
|
The same as the new --gameDir <game folder>.
|
13w16a to 13w23b |
--dataPackDir <data pack folder>
|
Did nothing. It was accepted and ignored. | 1.16-pre1 to 21w13a |
--assetsDir <assets folder>
|
The assets folder. Presumably ๐ File directory.png: Sprite image for directory in Minecraft .minecraft/assets/virtual/legacy by default.โ[more information needed] |
until 13w48b |
--userType <authentication scheme>
|
The authentication scheme used for logging in.
|
1.7.3 to 1.21.8 |
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 Launcher.
| Argument | Description |
|---|---|
--version <version>
|
The name of the version. |
--gameDir <game folder>
|
The folder for the instance's files. ๐ File directory.png: Sprite image for directory in Minecraft .minecraft by default. |
--assetsDir <assets folder>
|
The folder that contains, among others, the ๐ File directory.png: Sprite image for directory in Minecraft objects folder. ๐ File directory.png: Sprite image for directory in Minecraft .minecraft/assets by default. |
--tweakClass <tweaker class>
|
An optional class implementing net.minecraft.launchwrapper.ITweaker that can modify other classes while the game is starting.The vanilla tweakers are in the net.minecraft.launchwrapper package, for example net.minecraft.launchwrapper.VanillaTweaker.
|
A version's default main class is in its version.json under mainClass.
| Class | Versions | Source |
|---|---|---|
net.minecraft.client.main.Main
|
after release 1.5.2 | |
net.minecraft.launchwrapper.Launch
|
Alpha v1.0.11 through release 1.5.2 | new launcher |
net.minecraft.client.Minecraft
|
old launcher | |
<obfuscated>
|
start of Alpha through Alpha v1.0.5_01 | launcher |
net.minecraft.client.MinecraftApplet
|
Alpha | website applet |
net.minecraft.minecraft.<obfuscated>
|
Indev and Infdev | launcher |
net.minecraft.client.MinecraftApplet
|
website applet | |
com.mojang.minecraft.<obfuscated>
|
Classic 0.0.13a_03 through end of Classic | launcher |
com.mojang.minecraft.Minecraft
|
start of Classic through Classic 0.0.13a | |
com.mojang.minecraft.MinecraftApplet
|
Classic | website applet |
com.mojang.minecraft.RubyDung
|
late pre-Classic | |
com.mojang.rubydung.RubyDung
|
early pre-Classic | |
The launcher downloads additional required resources and saves them to ๐ File directory.png: Sprite image for directory in Minecraft
.minecraft/assets to be used by the game.
Minecraft requires several arguments when launched.
Since 1.12.2, they are defined in client.json under arguments.
Before that, the game arguments were defined in client.json under minecraftArguments while the JVM arguments were defined directly in the launcher.
| Java Edition Classic | |||||||
|---|---|---|---|---|---|---|---|
| ? | Added username, sessionid, loadmap_user, loadmap_id, and mppass as applet parameters. | ||||||
| ? | Added server and port as applet parameters. | ||||||
| ? | Added fullscreen as an applet parameter. | ||||||
| Java Edition Beta | |||||||
| 1.3b | Removed loadmap_user and loadmap_id. | ||||||
| Java Edition | |||||||
| 1.0 | Added stand-alone as an applet parameter. | ||||||
| 1.3.1 | 12w16a | Added demo as an applet parameter and --demo as a command line argument. | |||||
| 12w18a | Added --server-path and --server-entry as command line arguments. | ||||||
| 12w19a | Added server-entry and server-loc as applet parameters. | ||||||
Added --applet as a command line argument. | |||||||
Removed mppass. | |||||||
| 12w30a | Removed --server-path, --server-entry, server-entry, and server-loc. | ||||||
| 1.4.2 | 12w42a | Added --password as a command line argument. | |||||
| 1.6.1 | 13w16a | Added --workDir, --proxyHost, --proxyPort, --proxyUser, --proxyPass, --username and --session. | |||||
Removed sessionid, stand-alone, --applet and --password. | |||||||
Minecraft no longer uses a Java Applet. As such, certain applet parameters were made command line arguments: username to --usernameserver to --serverport to --portfullscreen to --fullscreendemo merged with --demo. | |||||||
| 13w23a | Added --version. | ||||||
| 13w24a | Added --gameDir and --assetsDir. | ||||||
Removed --workDir. | |||||||
| 13w25a | Added --width and --height. | ||||||
| 13w25b | Added --resourcePackDir. | ||||||
| 1.7.2 | 13w36a | Added --uuid. | |||||
| 13w38a | Added --accessToken. | ||||||
| 13w41a | Removed --session. | ||||||
| 1.7.4 | 13w47a | Added --userProperties. | |||||
| 13w49a | Added --assetIndex. | ||||||
| 1.7.3 | Added --userType. | ||||||
| 1.8 | 14w25a | Added --checkGlErrors. | |||||
| 1.8.1 | pre1 | Added --profileProperties. | |||||
| 1.9 | 16w05b | Added --versionType. | |||||
| 1.13 | 17w43a | Added --fullscreenWidth and --fullscreenHeight. | |||||
| 1.16 | 20w21a | Added --disableMultiplayer and --disableChat. | |||||
| pre1 | Added --dataPackDir. | ||||||
| 1.17 | 21w14a | Removed --dataPackDir. | |||||
| 1.18 | 21w38a | Added --xuid and --clientId. | |||||
| 1.20 | 23w14a | Added --quickPlayPath, --quickPlaySingleplayer, --quickPlayMultiplayer, and --quickPlayRealms. | |||||
Removed --server and --port. | |||||||
| 1.21.2 | 24w37a | Added --tracy and --tracyNoImages. | |||||
| 1.21.5 | 25w09a | Added --renderDebugLabels. | |||||
| 1.21.6 | 25w19a | --quickPlaySingleplayer can now be used without an identifier to launch into the last played world. | |||||
| 1.21.9 | 25w31a | Added --offlineDeveloperMode. | |||||
Removed --userType. | |||||||
| 25w32a | Removed --userProperties and --profileProperties. | ||||||
| 26.2 | snap1 | Added --vulkanValidation. | |||||
| snap2 | Added --graphicsBackend. | ||||||