While we believe that this content benefits our community, we have not yet thoroughly reviewed it. If you have any suggestions for improvements, please let us know by clicking the “report an issue“ button at the bottom of the tutorial.
Eclipse Out of Memory Error happens when you are working on large projects. Sometimes it’s because of Permgen space (below Java 8) and sometimes your eclipse memory runs out of heap memory.
We can increase eclipse memory by providing more Permgen space and heap memory for Eclipse to use. These settings are usually configured in the eclipse.ini file. You can check the location of the eclipse.ini file from below images for Mac OS X. In windows, you will find the eclipse.ini file in the same directory as the eclipse.exe file. Once you have located the eclipse.ini file, just open it in your favorite text editor.
You can increase the maximum heap size by editing -Xmx value. For example, below snippet will increase the eclipse heap size to 2 GB.
If you are using below Java 8, then you might get OutOfMemoryError: Permgen space, just increase the permanent generation space available to Eclipse. Below is the configuration to increase permgen space to 512 MB in eclipse.ini file.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in our Questions & Answers section, find tutorials and tools that will help you grow as a developer and scale your project or business, and subscribe to topics of interest.Sign up
Click below to sign up and get $100 of credit to try our products over 60 days!