Setting up eclipse

The default amount of memory Eclipse runs with is small and “Out Of Memory” errors are common. It is advisable to specify values on the command line by creating a new shortcut to the eclipse executable. These values can also be specified within the eclipse.ini file, but I have found changes here tend to be ignored (this may be an eclipse version issue that may have been fixed, but worth being aware of, just in case).

-vmargs -Xms512M -Xmx1024M -XX:PermSize=128M -XX:MaxPermSize=256M

The -Xms and -Xmx options specify the minimum and maximum heap size. The “Heap” being where all your objects live.

The -XX:PermSize and -XX:MaxPermSize options specify the minimum and maximum “Permanent Generation” memory and this is where objects which are not going to be garbage collected reside.

A shortcut to the eclipse executable is also useful for specifying other things, such as the workspace to use. Handy if you need to use multiple workspaces (e.g. HEAD and BRANCH scenarios).

comments powered by Disqus