I spent the better part of last weekend configuring my new work laptop to dual boot into Linux – 64 bit Ubuntu 8.04 (Hardy Heron) to be precise. A critical component of my install is Eclipse. To my aggravation, I found that when I was working Eclipse would crash with some meaningless error message about every 5-10 times I saved. I saw the same error – and crash – when I tried to refresh the explorer or perform a Subversion update using Subversive. For all intents and purposes, this made Eclipse unusable so I searched. And searched. And searched. And…you get the idea.
Eventually I stumbled on to a JVM bug and a related Eclipse bug that, frankly, sounded only marginally like what I was seeing (and that’s probably being generous). Nonetheless, desperation had set in and the JVM bug offered a workaround that was simple and would be easy to rollback so I decided to give it a shot. It worked.
Sometimes it’s better to be lucky than good. If the workaround had been more difficult I probably wouldn’t have tried it, but it wasn’t (more difficult), I did (try it) and it may be worth trying for anyone who’s experiencing similar issues. It’s as simple as adding the following lines to eclipse.ini:
These lines should be added in the -vmargs section. For what it’s worth, I’m running java version 1.6.0_06 and offer the usual disclaimer that YMMV.