MegaMek Discussion Board

Full Version: Adjusting Memory Usage in Megamek called by MekHQ
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi everyone,

I realize that you can edit a file (MegaMek.l4j.ini) included in the Megamek zip to run Megamek with more RAM.

How do I do that with the files included in MekHQ?

Everything I have tried has resulted in failure... Very embarrassing, but I'm hoping someone can help me out.

Thanks,
-Mike
I love Linux lol... I just made a hack version of the startup.sh Wink

I assume you can just make a batch file that contains this line (for 512MB):
java -Xmx512m -jar MekHQ.jar

I've attached my startup script for MekHQ in case it'll help anyone else.
Pretty much.  This is the contents of my batch file:

@echo off
echo Starting MekHQ...
echo.

java -Xmx1024m -jar MekHQ.jar

:done
@echo on
And that adjusts how much memory Megamek will have available when I start a scenario? weird.
If you start MegaMek from within MHQ, then they are sharing the same basic memory.  the -Xmx command sets the maximum memory, which I think defaults to 256m on most machines. Eventually, we will get OS-specific releases and there will be an l4j.ini file for MHQ as well, but for now, you need to create a batch file or run from the dos command line.
Awesome. thanks, everyone!