Help with JVM parameters

Discussion in 'Programming' started by CrimsonCrow98, May 21, 2016.

  1. Hello,

    I've been looking to make a custom launcher for myself, and I figured most of the aspects by myself. I'm able to get the accessToken from the Yggdrasil auth server and everything. However, as to HOW to launch the actual minecraft game from a batch file, I would either find unclear or outdated answers. I figured the JVM params are different depending on the minecraft version.


    The answer I found that appears to be the most accurate is:

    java
    -Djava.library.path=C:\Users\<username>\AppData\Roaming\.minecraft\libraries\org\lwjgl\lwjgl\lwjgl-platform\2.9.0\
    -cp
    C:\Users\<username>\AppData\Roaming\.minecraft\versions\1.7.4\1.7.4.jar;
    C:\Users\<username>\AppData\Roaming\.minecraft\libraries\java3d\vecmath\1.3.1\vecmath-1.3.1.jar;
    C:\Users\<username>\AppData\Roaming\.minecraft\libraries\net\sf\trove4j\trove4j\3.0.3\trove4j-3.0.3.jar;
    C:\Users\<username>\AppData\Roaming\.minecraft\libraries\com\ibm\icu\icu4j-core-mojang\51.2\icu4j-core-mojang-51.2.jar;
    C:\Users\<username>\AppData\Roaming\.minecraft\libraries\net\sf\jopt-simple\jopt-simple\4.5\jopt-simple-4.5.jar;
    C:\Users\<username>\AppData\Roaming\.minecraft\libraries\com\paulscode\codecjorbis\20101023\codecjorbis-20101023.jar;
    C:\Users\<username>\AppData\Roaming\.minecraft\libraries\com\paulscode\codecwav\20101023\codecwav-20101023.jar;
    C:\Users\<username>\AppData\Roaming\.minecraft\libraries\com\paulscode\libraryjavasound\20101123\libraryjavasound-20101123.jar;
    C:\Users\<username>\AppData\Roaming\.minecraft\libraries\com\paulscode\librarylwjglopenal\20100824\librarylwjglopenal-20100824.jar;
    C:\Users\<username>\AppData\Roaming\.minecraft\libraries\com\paulscode\soundsystem\20120107\soundsystem-20120107.jar;
    C:\Users\<username>\AppData\Roaming\.minecraft\libraries\io\netty\netty-all\4.0.10.Final\netty-all-4.0.10.Final.jar;
    C:\Users\<username>\AppData\Roaming\.minecraft\libraries\com\google\guava\guava\15.0\guava-15.0.jar;
    C:\Users\<username>\AppData\Roaming\.minecraft\libraries\org\apache\commons\commons-lang3\3.1\commons-lang3-3.1.jar;
    C:\Users\<username>\AppData\Roaming\.minecraft\libraries\commons-io\commons-io\2.4\commons-io-2.4.jar;
    C:\Users\<username>\AppData\Roaming\.minecraft\libraries\net\java\jinput\jinput\2.0.5\jinput-2.0.5.jar;
    C:\Users\<username>\AppData\Roaming\.minecraft\libraries\net\java\jutils\jutils\1.0.0\jutils-1.0.0.jar;
    C:\Users\<username>\AppData\Roaming\.minecraft\libraries\com\google\code\gson\gson\2.2.4\gson-2.2.4.jar;
    C:\Users\<username>\AppData\Roaming\.minecraft\libraries\com\mojang\authlib\1.2\authlib-1.2.jar;
    C:\Users\<username>\AppData\Roaming\.minecraft\libraries\org\apache\logging\log4j\log4j-api\2.0-beta9\log4j-api-2.0-beta9.jar;
    C:\Users\<username>\AppData\Roaming\.minecraft\libraries\org\apache\logging\log4j\log4j-core\2.0-beta9\log4j-core-2.0-beta9.jar;
    C:\Users\<username>\AppData\Roaming\.minecraft\libraries\org\lwjgl\lwjgl\lwjgl\2.9.1-nightly-20131120\lwjgl-2.9.1-nightly-20131120.jar;
    C:\Users\<username>\AppData\Roaming\.minecraft\libraries\org\lwjgl\lwjgl\lwjgl_util\2.9.1-nightly-20131120\lwjgl_util-2.9.1-nightly-20131120.jar;
    C:\Users\<username>\AppData\Roaming\.minecraft\libraries\org\lwjgl\lwjgl\lwjgl-platform\2.9.1-nightly-20131120\lwjgl-platform-2.9.1-nightly-20131120-natives-windows.jar;
    C:\Users\<username>\AppData\Roaming\.minecraft\libraries\net\java\jinput\jinput-platform\2.0.5\jinput-platform-2.0.5-natives-windows.jar;
    C:\Users\<username>\AppData\Roaming\.minecraft\libraries\tv\twitch\twitch\5.12\twitch-5.12.jar;
    C:\Users\<username>\AppData\Roaming\.minecraft\libraries\tv\twitch\twitch-platform\5.12\twitch-platform-5.12-natives-windows-64.jar;
    C:\Users\<username>\AppData\Roaming\.minecraft\libraries\tv\twitch\twitch-external-platform\4.5\twitch-external-platform-4.5-natives-windows-64.jar;
    net.minecraft.client.main.Main
    --username=<your username>
    --accessToken <your accesstoken>
    --version 1.7.4
    --gameDir C:\Users\<username>\AppData\Roaming\.minecraft
    --assetsDir C:\Users\<username>\AppData\Roaming\.minecraft\assets
    --userProperties {}
    --uuid <your uuid>

    I tried an adapted version of the above, by changing the libs, version, changing the params accordingly to the json next to the jar and everything, but I would either get the help for java or an Could not find main class net.Minecraft.client.main.Main.

    I tried decompiling the official launcher of Minecraft and found a rather complex process builder.

    I also found various other answers including strange params like XXMaxHeadDump (I don't remember very well), IntelTricksForPerformance or stuff like that. I have limited knowledge of JVM params and I would like to make a batch file in order to launch Minecraft 1.9.4 and 1.8.9. Params for other versions would be nice too!
     
    #1 CrimsonCrow98, May 21, 2016
    Last edited: May 21, 2016
  2. Launching the game? You mean when you click Play (or something like that) right? If you open your launcher log and then click Play I think itshows what the launcher is doing, maybe some useful information is in there.
     
  3. I don't know why I didn't think about this before, huge thanks. Although the command works fine, it only shows the one with the parameters specific to my computer. I think the parameters are different if on a 32 bit or 64 bit computer. Also, it varies with the OS. I could always make VMs of each OS, but that would be a long and painful task. Do you know where I could find information about this?