Eclipse on Ubuntu gotcha

I’ve finally worked out why Eclipse has been crashing with out-of-memory errors all the time since I upgraded to Ubuntu Feisty.

Before this release, I was using a version of Eclipse I had installed manually. This time, I’m using the version packaged by Ubuntu.

The application launcher provided by Ubuntu calls /usr/bin/eclipse, which is a shell script wrapping the call to /usr/lib/eclipse/eclipse (which is what actually launches Eclipse). This wrapper adds some -vmargs to the call, which means that Eclipse ignores any -vmargs you’ve specifed in your eclipse.ini file… such as the ones to increase the Java heap size so as to stop Eclipse crashing with out-of-memory errors if you’re working on a large project.

Simple solution - change the launcher to call /usr/lib/eclipse/eclipse instead of /usr/bin/eclipse.

More complicated solution available in this Ubuntu bug report.

4 Responses to “Eclipse on Ubuntu gotcha”

  1. 127.0.0.1 Says:

    Eclipse out of memory op Ubuntu…

    Ik loop vrij regelmatig tegen ‘out-of-memory’ foutmeldingen aan met Eclipse. Direct resultaat is dat Elcipse onderuit gaat. Het vreemde is, dat ik 2GB tot mijn beschikking heb op mijn Ubuntu Gutsy en dit wordt niet allemaal aangesproken. Dit heeft,…

  2. Bill Says:

    THANKS! why would this be packaged this way in the first place. You saved me!

  3. Phil Says:

    Thank you! Your solution was so easy - why did I even bother looking at the Eclipse web site for an answer? :-)

  4. Harsha Says:

    You genius. Thank you so much.

Leave a Reply