0

I'm working on a custom MC Launcher, but I can't find a way to run Minecraft (1.8.5) from the command line. I saw some other examples which used to work fine on 1.7.2, but I can't get that code to work.

Code from previous Questions:

@echo off
cd\
set MCDIR=%APPDATA%\.minecraft
cd %MCDIR%
java -Xmx512M -Djava.library.path="%MCDIR%\versions\1.7.2\1.7.2-natives" -cp "%MCDIR%\libraries\org\apache\logging\log4j\log4j-api\2.0-beta9\log4j-api-2.0-beta9.jar;%MCDIR%\libraries\org\apache\logging\log4j\log4j-core\2.0-beta9\log4j-core-2.0-beta9.jar;%MCDIR%\libraries\com\ibm\icu\icu4j-core-mojang\51.2\icu4j-core-mojang-51.2.jar;%MCDIR%\libraries\com\mojang\authlib\1.3\authlib-1.3.jar;%MCDIR%\libraries\io\netty\netty-all\4.0.10.Final\netty-all-4.0.10.Final.jar;%MCDIR%\libraries\java3d\vecmath\1.3.1\vecmath-1.3.1.jar;%MCDIR%\libraries\net\sf\trove4j\trove4j\3.0.3\trove4j-3.0.3.jar;%MCDIR%\libraries\net\sf\jopt-simple\jopt-simple\4.5\jopt-simple-4.5.jar;%MCDIR%\libraries\com\paulscode\codecjorbis\20101023\codecjorbis-20101023.jar;%MCDIR%\libraries\com\paulscode\codecwav\20101023\codecwav-20101023.jar;%MCDIR%\libraries\com\paulscode\librarylwjglopenal\20100824\librarylwjglopenal-20100824.jar;%MCDIR%\libraries\com\paulscode\libraryjavasound\20101123\libraryjavasound-20101123.jar;%MCDIR%\libraries\com\paulscode\soundsystem\20120107\soundsystem-20120107.jar;%MCDIR%\libraries\com\google\guava\guava\15.0\guava-15.0.jar;%MCDIR%\libraries\org\apache\commons\commons-lang3\3.1\commons-lang3-3.1.jar;%MCDIR%\libraries\commons-io\commons-io\2.4\commons-io-2.4.jar;%MCDIR%\libraries\net\java\jinput\jinput\2.0.5\jinput-2.0.5.jar;%MCDIR%\libraries\net\java\jinput\jinput-platform\2.0.5\jinput-platform-2.0.5-natives-windows.jar;%MCDIR%\libraries\net\java\jutils\jutils\1.0.0\jutils-1.0.0.jar;%MCDIR%\libraries\com\google\code\gson\gson\2.2.4\gson-2.2.4.jar;%MCDIR%\libraries\org\lwjgl\lwjgl\lwjgl\2.9.0\lwjgl-2.9.0.jar;%MCDIR%\libraries\org\lwjgl\lwjgl\lwjgl_util\2.9.0\lwjgl_util-2.9.0.jar;%MCDIR%\versions\1.7.2\1.7.2.jar" net.minecraft.client.main.Main --username [player name] --version 1.7.2 --gameDir C:\DOCUME~1\[USER]\APPLIC~1\MINECR~1 --assetsDir C:\DOCUME~1\[USER]\APPLIC~1\MINECR~1\assets --accessToken [obtain from launcher_profiles.json in MC directory] --uuid (Default)

(Source)

I would like to know if there is a way to do this.

2
  • 1
    Did you use that code exactly as is, or did you modify it to replace the version numbers? What command do you have currently? Nov 15, 2015 at 22:07
  • @MichaelFrank I modified the code a bit (changed the version number 1.7.2 to 1.8.5 ). I began checking if the other files exist, and yes, they do exist, but the code still doesn't work. Any ideas?
    – user522216
    Nov 16, 2015 at 13:50

1 Answer 1

1

This is a duplicate of this question: https://stackoverflow.com/questions/14531917/launch-minecraft-from-command-line-usename-and-password-as-prefix.

1
  • Unfortunately there isn't a flag for duplicates on other stacks. Good find though.
    – Burgi
    Jan 15, 2016 at 11:26

You must log in to answer this question.