1 minute read

One error that has bugged my Eclipse PDT for a long time, was _org.eclipse.emf.ecore.util.EcoreEMap $DelegateEObjectContainmentEList. _A vague error, not much to go on, not many hits on google either. Turned out it had to do with the version of my Java Runtime Environment I was using.

Current Java Version in Use

You can check what Java Runtime version Ubuntu is using by entering:

$ java -version

In my case, it resulted in the following output

java version "1.5.0"
gij (GNU libgcj) version 4.2.3 (Ubuntu 4.2.3-2ubuntu6)

Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO


Even though I have the original Sun Runtime installed:

$ dpkg -l |grep jre
ii  sun-java6-jre    6-07-3ubuntu2    Sun Java(TM) Runtime Environment

(JRE) 6

It was not being used. It was before. I don't know what changed it.

Available Java Versions on System

To change it back, I used

$ sudo update-java-alternatives -l

to show me what candidates were available:

java-6-sun 63 /usr/lib/jvm/java-6-sun
java-gcj 1042 /usr/lib/jvm/java-gcj

Change Java Version

I really want to change it back to Sun's version, so I run

$ sudo update-alternatives --config java

Which will show me

There are 4 alternatives which provide `java'.
  Selection    Alternative
          1    /usr/bin/gij-4.2
          2    /usr/bin/gij-4.1
*+        3    /usr/lib/jvm/java-gcj/jre/bin/java
          4    /usr/lib/jvm/java-6-sun/jre/bin/java

Press enter to keep the default[*], or type selection number:

So I press 4

And this gives me:

Using '/usr/lib/jvm/java-6-sun/jre/bin/java' to provide 'java'.

Confirm Java Version

To confirm it is really used, I ask Java it's version again:

$ java -version

Telling me:

java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
Java HotSpot(TM) Server VM (build 10.0-b23, mixed mode)

Alright, all did go well. When I run Eclipse PDT again, all of my errors are gone.

Thank you Ubuntu

Leave a Comment Right Here