LauncherJava is the Java-based component responsible for actually launching Minecraft.
LauncherJava is the Java-based component responsible for actually launching Minecraft. It acts as an intermediary between the C++ launcher and the Minecraft JVM process.
The launcher communicates via a text-based protocol:
mod legacyjavafixer-1.0
mainClass net.minecraft.launchwrapper.Launch
param --username
param PlayerName
param --version
param ProjT Launcher
param --gameDir
param /path/to/minecraft
param --assetsDir
param /path/to/assets
param --assetIndex
param 1.20.4
param --uuid
param xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
param --accessToken
param [TOKEN]
param --userType
param msa
windowTitle ProjT Launcher: Instance Name
windowParams 854x480
userName PlayerName
sessionId token:[TOKEN]:[UUID]
launcher standard
| Command | Description |
|---|---|
mod <name> |
Load a mod (tweaker) |
mainClass <class> |
Set main class |
param <value> |
Add launch parameter |
windowTitle <title> |
Set window title |
windowParams <WxH> |
Set window size |
userName <name> |
Player username |
sessionId <id> |
Session identifier |
launcher <type> |
Execute launch |
abort |
Cancel launch |
| Type | Use Case |
|---|---|
standard |
All Minecraft versions (recommended) |
legacy |
Minecraft < 1.6 (deprecated) |
LauncherJava is built as part of the main CMake build:
# Built automatically with main project
cmake --build build
# Or build separately
cd launcherjava
./gradlew build
debug on
mainClass ...
Since LauncherJava waits for the launcher command, you can:
launcher command