Friday, 25 July 2008

OutOfMemory Error from eclipse

I know there are hundreds of blog entries covering this. Here is another.

I followed the general scriptures and set the values in my eclipse.ini file. Currently mine looks like this:

--launcher.XXMaxPermSize 256m

However I was still getting OutOfMemory errors when trying to run an ant test coverage task. Why ?

I solved the problem, or should I say I have not seen the problem since I did the following:

In eclipse go to:
Window->Preferences->Java->Installed JREs.

Select the JRE that you are using and select 'Edit'.

Then add the following to the 'Default VM Aguments'
-Xms128m -Xmx1024m -XX:MaxPermSize=256m