NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

Minecraft Launcher Login Code [closed]

Want to improve this question? Update the question so it's on-topic for Stack Overflow.



Closed 9 years ago.



I don't know if this is the correct website to ask this (I also asked in the forums), but I created a Minecraft launcher from scratch (not with Java). Everything works and I can launch Minecraft, but it starts in offline-mode everytime. I used a batch-code to start the minecraft.jar in the .minecraft-Folder. Although I know there is a way for Minecraft to launch with parameters using the Minecraft Launcher, I cannot change the Minecraft-Directory (from.minecraft to.minecraft2). Is there any way to connect to Minecraft.net and to login and launch Minecraft using batch or Visual Basic? Thank you so much!



1 Answer 1



You can change the location Minecraft will look for its data folder by setting the APPDATA environment variable before running the launcher. You can do this with a batch script like this:



Remember, Minecraft.exe is secretly just a wrapped jar file, and its purpose in life as an EXE is to run itself with java.



You can pass arguments to it to select a username and password by changing the second line to something like this:



Or, if you really feel like it, you can obtain your very own session key by querying the login API directly, parsing your session ID and exact username from it, and launching minecraft directly (bypassing the launcher) with:



You can specify absolute paths for the minecraft jars, and if you do not, they must be relative to the working directory. To specify a relative path for the natives directory, use something like .ThisFolderRelativeToWorkingDir



Frankly I don't see why you're bothering. Just use magic launcher or something.



Thank you so much! I used the third script, but it always launched in offline-mode. I want to create my own launcher, that's why I don't use Magic Launcher. But how does Magic Launcher do that that it sais "Account migrated" or something like this? What does [sessionID] stand for? Password? Where do I have to put it? Thank you for your answer! - DigitalClark Oct 15, 2012 at 21:52



Yay! Thanks! I got it! minecraft servers Thank you so much! - DigitalClark Oct 15, 2012 at 21:59



I think that before you keep programming too much, you should learn a bit more about how file paths are treated, and the intricacies of absolute and relative paths. Also, click on the login link in the post (which tries to login to your username with a made up password) and it will become fairly evident immediately how magic launcher knows that you need to login with your email address. - Wug Oct 16, 2012 at 3:51



Well, I did it now. It works perfectly, I can log in and I can launch Minecraft. I know how that worked, but I didn't know about session IDs. Not it works. Thanks. - DigitalClark Oct 16, 2012 at 9:51



Not the answer you're looking for? Browse other questions tagged java visual-studio login batch-file minecraft or ask your own question.


My Website: https://gservers.org/minecraft-servers/
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.