LauncherJava

LauncherJava is the Java-based component responsible for actually launching Minecraft.

v0.0.4-2 Active
Download Now ↓ News About

Overview

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.


Launch Script Format

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

Commands

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

Launcher Types

Type Use Case
standard All Minecraft versions (recommended)
legacy Minecraft < 1.6 (deprecated)

Differences

  • Standard: Universal launcher, works with all versions
  • Legacy: Supports custom window icon/title but only for old versions

Building

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

Debugging

Enable Debug Output

debug on
mainClass ...

Attach Profiler

Since LauncherJava waits for the launcher command, you can:

  1. Start LauncherJava
  2. Attach your profiler (VisualVM, JProfiler, etc.)
  3. Send the launcher command