Java Edition client command line arguments

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.

Command line parts

The complete command line used to start the JVM 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 installation options in the launcher.
  • Arguments to configure the JVM, such as -cp (classpath) to specify the locations of required libraries and the main client.jar. Generated based on arguments.jvm in client.json.
  • Additional JVM arguments specified in installation options in the launcher.
  • Name of the main class. Specified as mainClass in client.json.
  • Arguments to the game itself, such as --gameDir to specify the base directory for user-generated game files. Generated based on arguments.game in client.json.
  • Additional game arguments specified in installation options in the launcher.

JVM arguments

Argument Description
-Djava.library.path=<natives folder> The path to the native libraries.
-cp <jars> The absolute paths listing the game and library jars to load, separated by ; on Windows or : on Linux and macOS.
-Dminecraft.launcher.brand=<launcher name> The name of the launcher.​[more information needed]
-Dminecraft.launcher.version=<launcher version> The version of the launcher.​[more information needed]
-Dos.name=Windows 10 -Dos.version=10.0 Tells Java to state that it is running on Windows 10 even when it's not.​[more information needed]
-XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump According to a post by u/scratchisthebest on Reddit, it makes Intel drivers on laptops with two GPUs use the dedicated GPU.
-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".
-Xss1M Sets the per thread stack size to 1 MB.

Game arguments

Argument Description
--clientId <client ID> The optional base64 encoded UUID from File file.png: Sprite image for file in Minecraft clientId.txt in .minecraft used for telemetry. The file is generated by the launcher if it's missing.
--username <player name> The player's name used for offline mode.​[more information needed]
--uuid <UUID> The player's UUID.
--xuid <XUID> The Xbox User ID.
--userType <authentication scheme> The authentication scheme used for logging in.

msa for Microsoft authentication
mojang for Yggdrasil (Legacy Mojang authentication)
legacy for Legacy Minecraft authentication

--accessToken <access token> The token generated during the login, required for joining servers. The format depends on the authentication scheme.
--demo Switches the game to Demo Mode.
--version <version name> The name of the version. Shown in the debug screen and in crash reports.
--versionType <version type> The type of the version (usually release or snapshot). Shown in the debug screen and in crash reports.
--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.
--assetIndex <assets index name> The JSON file for mapping internal names to indexes into the File directory.png: Sprite image for directory in Minecraft assets/objects folder. File directory.png: Sprite image for directory in Minecraft .minecraft/assets/indexes/<version>.json by default.
--width <width> The initial width of the game's window.
--height <height> The initial height of the game's window.
--disableMultiplayer Disables the multiplayer button.
--disableChat Disables sending and receiving chat messages.
--quickPlayPath <quick play logs path> The optional path from the .minecraft folder to the quick play logs file.
--quickPlaySingleplayer <world name> The optional name of the world to automatically join once the game has started.
--quickPlayMultiplayer <server address> The optional address of a server to automatically join one the game has started.
--quickPlayRealms <realm ID> The optional ID of a realm to automatically join once the game has started.

Legacy arguments

Argument Description Versions
--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.

presumable at least Indev to Alpha​[more information needed]
--session <session authentication> The session ID used to authenticate with Mojang while connecting to servers.

Defined as: token:<access authentication token>:<authentication UUID>.

unknown​[more information needed]
--userProperties <user properties> unknown​[more information needed]
--server <server address> The same as the new --quickPlayMultiplayer <server address>.
--workDir <game folder> The same as the new --gameDir <game folder>. 13w16a to 13w23b
--assetsDir <assets folder> The assets folder, presumably File directory.png: Sprite image for directory in Minecraft .minecraft/assets/virtual/legacy.​[more information needed] until 13w48b

Main class

A versions default main class is in it's version.json under mainClass.

Class Versions
net.minecraft.client.main.Main after 1.5.2
net.minecraft.launchwrapper.Launch Alpha 1.0.11 to 1.5.2 new launcher
net.minecraft.client.Minecraft old launcher
<obfuscated> start of Alpha to Alpha 1.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 to end of Classic launcher
com.mojang.minecraft.Minecraft start of Classic to 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

Assets

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.