How To Fix the "Outofmemoryerror Java Heap Space" Error

2 min. readlast update: 05.19.2025

Having issues with the error Outofmemoryerror Java Heap Space? In this quick guide, we'll show you how to resolve it for both CurseForge modpacks and manually installed modpacks!

CurseForge Modpacks:

Step 1: Head to Your CurseForge App and Locate the Modpack

In this case, I will be showing BMC4. 

Step 2: Right Click the Modpack and Select Profile Options

After selecting profile options, a screen will display with various options. 

Step 3: Change the RAM Allocation

Typically by default, Curseforge sets RAM to 4096MB (or about 4GB). To change this, select Custom RAM Allocation then set the amount to be about 8000MB. Then press Done.

You're good to go! The problem should be resolved!

If you continue to have issues with the error message, you may need to increase the RAM amount. If the problem still persists, feel free to reach out to us on live chat and we can help get the problem resolved!

Manually Installed Modpacks:

Step 1: Open Your Minecraft Launcher

Once in the Minecraft launcher, be sure you have your profile selected in the bottom left. Then, in the top left, select Installations

Step 2: Edit Your Profile

Once you've opened the installations tab, locate your profile (in this case, I will be using forge 1.20.1). Click the three dots next to your profile and select edit.

Step 3: Select More Options and Locate JVM arguments

There, by default, it should say -Xmx4G, instead change the to and 8. That will allocate 8GB to the profile, and thus solve the java out of memory error!

Click Save and you're good to go!

If you continue to have issues with the error message, you may need to increase the RAM amount. If the problem still persists, feel free to reach out to us on live chat and we can help get the problem resolved!

 

 

Was this article helpful?