By Pankaj Kumar
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.
-Xmx2048m
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.
-XX:MaxPermSize=512M
Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.
Java and Python Developer for 20+ years, Open Source Enthusiast, Founder of https://www.askpython.com/, https://www.linuxfordevices.com/, and JournalDev.com (acquired by DigitalOcean). Passionate about writing technical articles and sharing knowledge with others. Love Java, Python, Unix and related technologies. Follow my X @PankajWebDev
I am a regular reader of your blog. the blog is very interesting and will be much useful for us.
- sathya
An internal error occurred during: “Retrieving archetypes:”. GC overhead limit exceeded please help me to solve this
- HARSHA VARDHAN
Hello … I have an issue, My spring tool suite hangs (not responding) after using it for 5 mins and this happens when I start my server on which our application is hosted . Please help me out
- Rohit
Hello I am getting an internal error while launching the eclipse saying "java heap space " during setup check. Please help me!
- Aradhana
Not helpful at all. Most people use Windows these days.
- Buster McGibbons
I already have configured to 2056. What should I do? I still get error frequently.
- Praveen
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.