0

I'm trying to make a custom launcher but i don't know how to launch minecraft using the command line. I have seen this question: Launch Minecraft from command line - usename and password as prefix. But the answer just doesn't work so could anyone tell me how to launch minecraft using the command line with username and password as prefix

Community
  • 1
  • 1

1 Answers1

1

I've done it like this:

java -Xincgc -Xmx1024m -cp %appdata%\.minecraft\bin\minecraft.jar;%appdata%\.minecraft\bin\lwjgl.jar;%appdata%\.minecraft\bin\lwjgl_util.jar;%appdata%\.minecraft\bin\jinput.jar -Djava.library.path=%appdata%\.minecraft\bin\natives\ net.minecraft.client.Minecraft {username} {sessionCode}

You can get the sessioncode like this (=your linked post):

https://login.minecraft.net?user=<username>&password=<password>&version=13

The sessioncode is the content of the page and in the POST value. I doubt that you can do this only in cmd/batch. With the current launcher you can just do:

Minecraft.exe -u=<username> -p=<password>

This solution will open the Minecraft launcher and fill the fields with the given data.

Hope this helps :)

JensV
  • 3,997
  • 2
  • 19
  • 43