I'm trying to make a simple custom Minecraft launcher thing.
According to minecraft wiki's Launcher page:
it should be possible to run the minecraft launcher using username and password as prefix from the command line, and go directly to the game instead of through the launcher.
I've tried various versions of
java -cp -u=username -p=password minecraft.jar net.minecraft.LauncherFrame
java -cp minecraft.jar net.minecraft.LauncherFrame <username> <password>
prefix -u=username or -p=password don't exist
You can do this, you just need to circumvent the launcher.
~/.minecraft/bin on unixy systems), there is a minecraft.jar file. This is the actual game - the launcher runs this.
Invoke it like so:
java -Xms512m -Xmx1g -Djava.library.path=natives/ -cp "minecraft.jar;lwjgl.jar;lwjgl_util.jar" net.minecraft.client.Minecraft <username> <sessionID>
Set the working directory to
To get the session ID, POST (request this page):
You'll get a response like this:
The fourth field is the session ID. More details here. Read those details, this answer is outdated