Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debug eclipse plugin project -- PermGen space, out of memory error

I have a plugin project. When i debug this as an eclipse application, in the 2nd eclipse that opens, I want to open Project explorer window. As soon as I click on the button to do this, I get java.lang.OutOfMemoryError: PermGen space. I tried changing the PermGen space in the preference, but it did not help. Can any one please suggest a solution.

like image 684
Krishnaveni Avatar asked Jun 11 '12 08:06

Krishnaveni


3 Answers

You should add the -XX:MaxPermSize=256m or 512m to the Window>Preferences>Java>Installed JREs preference page. Edit a JRE and add it to the Default VM arguments tab.

The eclipse native launcher uses the eclipse.ini to add extra permgen arguments to Oracle JVMs, but that information is not used during runtime launching.

like image 144
Paul Webster Avatar answered Nov 19 '22 01:11

Paul Webster


What if you try to extend the memory of eclipse when it starts. To do that simply open the .ini file (inside your eclipse folder) and edit the lines that refer to permSize and memory size: e.g.

-XX:MaxPermSize=500m
-Xms500m
-Xmx2000m
like image 22
mikrohelen Avatar answered Nov 19 '22 01:11

mikrohelen


If you don't want to set the permgen size for EVERY launch, you can also add the Parameter to the Debug Configuration.

Run > Debug Configurations

Choose the "Eclpise Application"-Configuration on the right side and choose Arguments in the Tabs.

Add -XX:MaxPermSize=512m to the VM arguments:

-Dosgi.requiredJavaVersion=1.6 -Xms256m -Xmx4g -Dfile.encoding=UTF-8 -XX:MaxPermSize=512m
like image 1
Manuel Avatar answered Nov 19 '22 01:11

Manuel