Jump to content

Permgen and LiteLoader


plowmanplow

Recommended Posts

  • Discord Moderator

During my time providing support for custom modpacks I have occasionally run across a pack which required PermGen allocation to be higher than the default 128M. I've seen questions about this before so I figured I would make a post about it for folks to gander at, but also so that it would show up when searched for as well.

I have also seen posts by folks looking to include LiteLoader in a Technic custom modpack. For 1.7.2+ this is as simple as dropping the LiteLoader jar file into a modpack. For <=1.6.4 it is a bit more involved.

The Java arguments which are passed to the client process by the launcher are pulled from the "version.json" file inside the modpack.jar. That file can be edited to provide additional command line parameters such as for PermSize and to include libraries such as LiteLoader.

For PermGen space on a server you simply add this to your command line:

-XX:PermSize=128m -XX:MaxPermSize=128m
This can be set to whatever you need so bumping it to 256m is straight forward. In the client, since the Launcher will pull the version.json file out of modpack.jar and overwrite the file in the "bin" folder it is necessary to edit the file in the modpack.jar to persist any changes. Simply add the PermSize changes to the parameters at the top of the file like so:

    "minecraftArguments": "--username ${auth_player_name} --session ${auth_session} --version ${version_name} --gameDir ${game_directory} --assetsDir ${game_assets} --tweakClass cpw.mods.fml.common.launcher.FMLTweaker",
becomes

    "minecraftArguments": "--username ${auth_player_name} --session ${auth_session} --version ${version_name} --gameDir ${game_directory} --assetsDir ${game_assets} -XX:MaxPermSize=256m --tweakClass cpw.mods.fml.common.launcher.FMLTweaker",
In a similar fashion, it is possible to add the LiteLoader initialization like so:

    "minecraftArguments": "--username ${auth_player_name} --session ${auth_session} --version ${version_name} --gameDir ${game_directory} --assetsDir ${game_assets} --tweakClass com.mumfrey.liteloader.launch.LiteLoaderTweaker --tweakClass cpw.mods.fml.common.launcher.FMLTweaker",
note the addition of:

--tweakClass com.mumfrey.liteloader.launch.LiteLoaderTweaker
After the change to the startup parameters, it is necessary to add a library definition to the version.json f

ile as well. Look for the section right at the top that has this line:

    "libraries": [
then add the following directly after that and before the first existing library definition:

        {
            "url": "http://dl.liteloader.com/versions/",
            "name": "com.mumfrey:liteloader:1.6.4"
        },
For those of you who don't want to go editing your own files I have prepared downloads with the changes already in place. These are Solder ready but can easily be used in your standard modpack by unzipping them.

Forge for 1.6.4 Build 965 with LiteLoader: https://copy.com/VJWY16eHefyt?download=1]1.6.4_9.11.1.965_LL

Forge for 1.6.4 Build 965 with 256M PermSize: https://copy.com/B0y1EHeTTLwU?download=1]1.6.4_9.11.1.965_PG

Forge for 1.6.4 Build 965 with LiteLoader and 256M PermSize: https://copy.com/3zQXwpU4YMR9?download=1]1.6.4_9.11.1.965_LL_PG

Edited by plowmanplow
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...