> For the complete documentation index, see [llms.txt](https://morpheus-launcher.gitbook.io/home/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://morpheus-launcher.gitbook.io/home/for-developers/command-line-usage.md).

# Command Line Usage

Unlike the native flutter gui, the "core" application of Morpheus Launcher is written in Java and pratically is compatible with every combination of operating system and processor. In this guide you learn how to use morpheus launcher from commandline, even when flutter gui isn't available.

## JVM Arguments

### **-Djava.library.path**

* This is a JVM argument that specifies where natives is located, minecraft requires this because lwjgl has native libraries that should be loaded into jvm, here below a quick example how the path should be passed to jvm argument

```
java -Djava.library.path="~/.minecraft/versions/1.8.9/natives/" -jar Launcher.jar [options]
```

***

## Launcher arguments

### **-version**

* This argument specifies which version the launcher should launch. it is able to accept any value that is given to it as long as it recognizes the json to be able to parse it and start the game, so it is possible to give it version names vanilla, optifine, forge, and even fabric. when the latter is recognized it is installed directly by the launcher itself. Below you will find a couple of examples.

```
-v fabric-loader-0.15.1-1.20.4
```

```
-v 1.8.9-OptiFine_HD_U_M5
```

{% hint style="success" %}
Morpheus launcher can recognize if running forge, fabric or optifine and proceeds to install automatically
{% endhint %}

### -minecraftUsername

* this parameter specifies the in-game username to Minecraft, it can be up to 16 characters long

```
-n TestPlayer
```

### -minecraftToken \<token>

* this parameter is provided to the game to be able to authenticate with premium servers, however it can also accept any other value in the case of offline/non-premium players, here is an example:

```
-t 0
```

### -minecraftUUID \<uuid>

* this parameter defines player uuid, this doesn't seem to have much effect but is recommended to give the correct uuid related to nickname

```
-u bb77495aa7403169a23869654c8bd2c1
```

{% hint style="success" %}
Bonus info: in minecraft the uuid for sp accounts is derived from an md5 digest and by appending *OfflinePlayer:* before the username. for example: `OfflinePlayer:TestPlayer`
{% endhint %}

### -forceClassPath

* this parameter forces the launcher to use classpath (-cp) instead of dynamic classloading

### -gameFolder

* if this parameter is used permit to install minecraft on a user defined directory, instead if isn't defined the launcher will fallback to default game directory

### -startOnFirstThread

* this parameter is required on macos in addition to -forceClassPath to tell java to start minecraft as first thread

***

### **If you need more clearer informations here a table with all arguments**

<table><thead><tr><th width="110">Option</th><th width="192">Long Option</th><th width="148">Option Arg</th><th>Description</th></tr></thead><tbody><tr><td>-n</td><td>-minecraftUsername</td><td>&#x3C;username></td><td>Minecraft player username</td></tr><tr><td>-t</td><td>-minecraftToken</td><td>&#x3C;token></td><td>Minecraft player token</td></tr><tr><td>-u</td><td>-minecraftUUID</td><td>&#x3C;uuid></td><td>Minecraft player uuid</td></tr><tr><td>-v</td><td>-version</td><td>&#x3C;gameversion></td><td>Minecraft version to be launched</td></tr><tr><td>-c</td><td>-forceClassPath</td><td></td><td>Forces the use of classpath instead of classloading</td></tr><tr><td>-f</td><td>-gameFolder</td><td>&#x3C;path></td><td>Defines custom game folder path</td></tr><tr><td>-x</td><td>-startOnFirstThread</td><td></td><td>This is required on macos to fix optifine</td></tr></tbody></table>
