Eclipse crashes on Ubuntu 8.04

Eclipse looked like it was running fine on a first glance, but than it started crashing as soon as I tried to open files from the Project Explorer. I’m using the latest ubuntu-eclipse 3.2 and it happened regardless whether I started in Java or PHP (added PHPEclipse) perspective. I tried a couple of things to get it running and at the end found a way to make it work.

The error I most of the time got was from the JVM, see the screenshot on the right hand side. The same happened when I deinstalled sun-java-1.6 version and sun-java-1.5 kicked in. I found a pretty good thread about similar problems and tried the suggested changes on the eclipse.ini, the autobuild properties of eclipse and so on. But none of them worked for me. Not changing the command line options nor changing VMs.

I though found a solution for my problem: Starting eclipse from the command line defining the 1.5 JAVA specifically.  So I created a shell script with the following contents:

#!/bin/sh
/usr/lib/jvm/java-1.5.0-sun-1.5.0.15/bin/java -cp /usr/lib/eclipse/startup.jar org.eclipse.core.launcher.Main

And that’s all I need to do, it now works like a thread. Running the eclipse default starter from the menu still causes the same sort of crashes. This is definetely a weird thing and apparentely the changes I applied to eclipse.ini are not affecting anything, which is pretty annoying. Still, happy I can continue working properly now. Let me know whether this helps for you or if there are other ways you got your eclipse working, will keep my eyes on that topic – Eclipse is just too cool to miss it in my environment.

Update: I added the above command line to the Menu: Right Click on the Applications Panel, select ‘Edit Menus’, navigate to ‘Programming Tools’ or whereever you want the starter and add a new item as in the screenshot below. This way I don’t have a terminal window open each time I want to start eclipse.

Calling Eclipse from the menu with specific JVM

Advertisements

13 Responses

  1. Thanks for posting this. I had this issue; I tried all suggested solutions; nothing worked. Finally, I followed the instructions here: removed java1.6, installed java1.5, and specifically referred to Java1.5 when starting Eclipse (from menu) and it worked!

  2. Awesome! Thanks for the feedback. Sounds the same as for me, none of the other tips did work. I could not work without Eclipse and am actually surprised this is not an uncommon issue. Anyway, glad this works for you as well.

  3. I dont have startup.jar. You must have installed eclipse through synaptic. I downloaded eclipse from the website, unzipped and began using it. Do you have any idea about how to fix the problem in such installations?

  4. Hi, I am on the road right now, so will have a look as soon as I’m back home, but my first guess would be to check how you start eclipse, assume the run.sh. Adopt this one to use the specific JVM. Let me know any results, will get back soon.

  5. Thanks!

    My Eclipse was crashing intermittently for the last couple of weeks, and I was too lazy to look into it..
    Now when I decided it was too much to bear, I came across this post and solved it in 5 minutes 🙂

  6. Well,
    If you have Hardy 64bits, then there’s a bug in the JVM… It was addressed as in the post at http://ubuntuforums.org/showthread.php?t=771451

    Just add the following line to the eclipse.ini

    -XX:CompileCommand=exclude,org/eclipse/core/internal/dtree/DataTreeNode,forwardDeltaWith

    It works like a charm…

    Marcello

  7. […] Posts Upgrading Eclipse 3.2 to 3.4DELL XPS M1330 upgrade to dual boot Ubuntu 8.10Eclipse crashes on Ubuntu 8.04How to: Update (re-install) grub while merging partitions and still be able to bootPidgin crashes […]

  8. Thank you for this excellent solution! I wasted a great deal of time with this several months ago and never could get a good solution. So, I reverted to an earlier version of Ubunto (7.10) and that seemed to work fine with the Eclipse that I had. Now I am running 8.04 again, and ran into the same problem all over again.

    Only this time, I found your “simple” solution, and everything seems to be working well.

    Thanks again for posting this!

  9. Thanks for posting this, it fixed the problems with the java process crashing in Eclipse on Ubuntu 8.10. I used “java-1.5.0-sun-1.5.0.16” in the path though since that was the version that got installed from the repository now.

    Works perfectly. No more crashing.

  10. probably sudo update-java-alternatives -s java-6-sun will make your eclipse work fine in ubuntu 8.04 .It worked for me
    .

  11. Works. Thanks!

  12. THANK YOU so much! This had me going crazy!!!

  13. […] Here’s an explanation, although the solution below is specific to Eclipse 3.2. […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

%d bloggers like this: