Minecraft Launcher

The Minecraft launcher is the login and downloader front-end to the stand-alone client. It is responsible for downloading the main Java packages, including minecraft.jar, which holds the code and resources of the game such as textures, and LWJGL. It also acts somewhat like a basic and easily bypassable copy-restriction by forcing the user to login to a paid account when running for the first time. It is possible to use the launcher to run versions of Minecraft from nearly any era. However, not every version of the game is included (to see a list of all missing versions, see versions not in the launcher). The current launcher is the sixth launcher for Minecraft, and the second that was built to automatically update itself.

Launch
Every time the launcher is executed, it checks a specific directory where Minecraft stores its files called ".minecraft". It checks a file called "launcher_profiles.json" for login credentials. If the file does not exist, is corrupt, or no user is logged in, the user must login with a valid premium account, otherwise the user will be directed to play the Demo version or purchase the game.

When logging in, the launcher will first try to verify the login. If a valid "launcher_profiles.json" file exists but there is no Internet connection, the launcher will offer a "Play offline" mode if a player was logged in when it was last closed. If the connection is successful, the launcher will then, depending on profile options, compare the latest version in the latest "versions" directory to the latest version reported by the server. If the selected version does not exist or the latest installed version is outdated when "Use latest version" is selected in the profile, the launcher will download all Minecraft components and Java binary files. It will also synchronize everything in the "assets" folder (see Resource pack).

Finally, upon a successful update or installation, the launcher will execute the Minecraft jar (via "javaw.exe", Oracle's Java Virtual Machine executable.) It is possible however for there to be missing ".jar" files, in which case the launcher will attempt to replace the missing files automatically but will stop if there is no connection.

Currently, the Minecraft launcher supports 57 languages.

Launcher

 * Manage multiple profiles (stored in "launcher_profiles.json"). Each profile can control:
 * Game version. Includes access to outdated development builds and previous releases. Older/custom versions can also be added manually.
 * Mojang account used to play the game
 * Command line arguments for Java (such as heap size)
 * Game directory (where the game files are saved on disk)
 * Edit profile pictures or custom made ones
 * The launcher doesn't store the password locally. Instead of this, it uses a 'refresh token'
 * The launcher supports multiple instances (as the game also does)
 * Automatic updates for launcher
 * Ability to update libraries, such as LWJGL
 * online mode. (The first time launch requires an Internet connection to download required resources)
 * 57 languages available
 * Crashes can be reported to Mojang, through Hopper
 * Crashes are indexed through a database for information on how to fix the issue
 * Launcher Settings
 * Switching accounts or logging off
 * Changing skins
 * Downloads servers on versions
 * Help button
 * Shows you the launcher version information when you click the launcher version

Backward Compatibility
The Minecraft launcher has the ability to play old Alpha and Beta versions of the game. Currently, snapshots, Alpha, Beta, and all Release versions are available to play. Four Pre-classic versions, four Classic versions, and one Infdev version are already added under the names "old-alpha version". No Indev versions are currently available from the launcher.

To enable the old versions either click the "Launch Options" then turn the "Historical Versions" on then open your profile or make a new one, next select any of Alpha/Beta versions on the Version box then click "Save" button.

However, these versions are very out of date and may be unstable. Any bugs, glitches, missing features, or crashes that result from instability will never be resolved as only later versions are supported. Mojang strongly recommends that you play them in separate directories than your other saves to avoid corruption.

Skins
You can change or add your custom skin within the Minecraft launcher. To change or add your skin click the "Skins" button, then click the "Browse" button to navigate through your file system for your skin file. The file must have a resolution of 64×64 in order for the launcher to accept it as a skin file. Additionally, the skin file must be in a  format. After you have found the skin file, click the "Save" button to confirm your in-game skin.
 * You can reset your skin to the Steve or Alex defaults by clicking "Click to reset".
 * You can choose between player models - either Classic (Steve) or Slim (Alex).

If the game is running when the user enters this menu, a warning appears at the bottom of the launcher: ''Minecraft is currently running. Skin changes may not take effect until the game is next started.''

Profiles
When you open the launcher for first time, it creates a profile that selects the latest version of Minecraft - it cannot be removed.

However, you may create a game profile of your own in the launcher. Click on the "Launch Options" button, then click "Add New" to create one. After this, name your profile as you want it. If you leave it, it will be named "Unnamed Configuration". Then, optionally, select a profile picture from the launcher or a custom one. However, it must be a 128×128  picture. Select the version you wish to play, and click "Save" to confirm your profile. If you want to edit a profile, just click it. The same applies if you wish to delete a profile. Simply click the profile you want to delete and then click the "Delete [X]" button to remove it.
 * 2016LauncherProfileSettings.png can download server versions by clicking "Download Server".
 * If you want to resize the game, turn "Resolution" on to change the game window size.
 * You can turn "Advanced Settings" on to show more profile options.
 * If you want to change the  file path, turn the on the "Game directory" option. Now, navigate to the folder where you wish to relocate the   folder. You can also open the Minecraft profile by clicking the green arrow-shaped "Go to folder" button.
 * If you turned "Snapshot Versions" on, it creates a "Latest Snapshot" profile automatically.
 * You can manually set a logging configuration (see the Debugging article on wiki.vg for more info)

Command Line usage
As of 2.1.1432, the launcher has 9 command-line options available:
 * - This option deletes the  and   folders, including their contents, from the working directory.
 * - This option, followed by a path (relative or absolute), will change the location (and/or name) of the  folder.
 * - This option, followed by a path (relative or absolute), will change the location (and/or name) of the  folder.
 * - This option adds support for Windows 10. Since the launcher now supports Windows 10 fully, this option is unnecessary and seems to have no effect.
 * - This option, followed by a path (relative or absolute), will change the location (and/or name) of the  folder.
 * - This option adds support for Windows 10. Since the launcher now supports Windows 10 fully, this option is unnecessary and seems to have no effect.
 * - This option adds support for Windows 10. Since the launcher now supports Windows 10 fully, this option is unnecessary and seems to have no effect.

The  option can be used to create a portable installation of the game. For example,  can be used to make the launcher use the current directory (no matter what your current folder is called).

Trivia

 * In the top left corner a barely visible button can be found which randomly shows either a creeper face or a shrug kaomoji ¯\_(ツ)_/¯. It glows white when clicked, but has no use at all.
 * The creeper face as well as shrug were used for the language selection menu during the beta phase of the launcher, but when a globe was added instead both were simply moved downwards to be kept as an Easter egg.
 * Hovering long enough over the "Play" button will cause random mobs appear on the right side of the window.