Java Heap Space OOM on Eclipse MAT — How to fix

Steven Lacerda
Jan 27, 2022

I had the hardest time increasing the memory for Eclipse MAT because everyone was pointing to an eclipse.ini file, but that file didn’t exist. Instead, I had to update the MemoryAnalyzer.ini, and not the eclipse.ini file.

I kept receiving an error regarding Java Heap Space, so the JVM was OOM’ing. To fix that, I downloaded the latest version of Eclipse from here:

https://www.eclipse.org/mat/downloads.php

Installed it on my MacOS system. Then I right-clicked the application in the /Applications folder and selected Show Package Contents:

Now, under Eclipse, you should see MemoryAnalyzer.ini:

Open MemoryAnalyzer.ini in a text editor of your choice, and edit the -Xmx parameter:

Restart Eclipse MAT and that should be all there is to it.

--

--

Steven Lacerda

Steve Lacerda is a software engineer specializing in web development. His favorite 80’s song is Let’s Put the X in Sex by Kiss.