So I've been searching high and low for a bit for an answer to this with no luck. Does anyone know how to set JVM arguments at a global level, or even at a per Version level in the new launcher? I know it can be done at a per Profile level. But -Xmx1G? Really? I would much rather be able to set the default at something much more appropriate for my machine by default.
I've been experimenting around with figuring this out at a per Version level (%AppData$\Roaming\.minecraft\versions\<whatever versions you've happened to download>\<$_>.json for the Windows folks) and have had at least minor success, having the launcher accept '--javaArgs' as an argument supplied to "minecraftArguments" in the aformentioned json file. I have unfortunately been unable to find an argument format that it will successfully accept.
At any rate, can someone help me solve one of the above?
While '-Xmx1G' is fine as a shipped default (especially for things like 32-bit Java that cap out on RAM usage around 1G anyway), I can and would like to do better. I typically like to start out with something along the lines of '-Xincgc -Xmx4G' and work from there depending on what I'm trying to do with any given profile. Whether that's a plain vanilla profile, a profile with tens or hundreds of mods and/or plugins, or maybe just trying to do some large scale editing while inside a world.
edit: While I realize I'm taking a hit on performance with '-Xincgc', I haven't had any issues with stability and like the incremental garbage collection.
derp. Still leaves the question of how it was (and continues to) use ~4G of RAM despite this though. But I'll leave that question to another post in the modded client forum.
I think I figured out the formatting (and could have sworn I'd previously tried this. set and subsequently undone changes to the global java config somehow getting cached somewhere seems unlikely.) for doing this in the version json file %AppData%\.minecraft\versions\yourMinecraftVersion\yourMinecraftVersion.json. Adding the JVM options in a manner similar to the following seems to work as expected, at least based on the RAM settings I'm seeing in-game with the usage stats from F3.
A follow up to the previous. Setting it in the manner described does seem to *eventually* work, though it seems to take a couple launches of any profile attached to the version before the profile picks it up. Will follow up with any more interesting revelations should I find them.
I'm now seeing the launcher trying to pass the ' --javaArgs Xincgc Xmx4G' flag to profiles that don't even have the aforementioned edit in their Version json file. This doesn't bode well...
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I've been experimenting around with figuring this out at a per Version level (%AppData$\Roaming\.minecraft\versions\<whatever versions you've happened to download>\<$_>.json for the Windows folks) and have had at least minor success, having the launcher accept '--javaArgs' as an argument supplied to "minecraftArguments" in the aformentioned json file. I have unfortunately been unable to find an argument format that it will successfully accept.
At any rate, can someone help me solve one of the above?
-
View User Profile
-
View Posts
-
Send Message
Retired Staffedit: While I realize I'm taking a hit on performance with '-Xincgc', I haven't had any issues with stability and like the incremental garbage collection.
Client> 2013-09-06 15:58:44 [INFO] [STDOUT] Completely ignored arguments: [--javaArgs, Xincgc, Xmx4G]
derp. Still leaves the question of how it was (and continues to) use ~4G of RAM despite this though. But I'll leave that question to another post in the modded client forum.
"minecraftArguments": "--username ${auth_player_name} --session ${auth_session} --version ${version_name} --gameDir ${game_directory} --assetsDir ${game_assets} --tweakClass cpw.mods.fml.common.launcher.FMLTweaker --javaArgs Xincgc Xmx4G",
And yes, I realize the above profile screencap has mods installed, but the original question is still relevant to the unmodified launcher from Mojang.
edit: A clean image for your viewing.