- Published on
org.eclipse.emf.ecore.util.EcoreEMap
- Authors

- Name
- Kevin van Zonneveld
- @kvz
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
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
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 its 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
Legacy Comments (10)
These comments were imported from the previous blog system (Disqus).
this article really helped.
I would never have thought that something had rewritten the alternatives symlinks.
maybe some package update?
@ michele: Yeah I have no idea, I haven\'t played around with java or anything. Something must have told it to switch versions. But what..
Thanks Kevin! I too was suddenly having problems with Eclipse and this did the trick. Unfortunately I have no idea what may have changed the Java version in use.
Excellent. Thanks very much. I had the exact same problem and it was driving me crazy until I found your solution.
Thanks for the solution. This was driving me crazy. I upgraded from Hardy to Intrepid and I guess it switched it back to gcj without me noticing.
@ Kevin (a different one): Yeah maybe it was an upgrade. Could have been anyway. Thanks for sharing.
works fine! tks!
I was going nuts with Eclipse, I installed Oxygen plugin and all sorts of errors where shown, after veryfing the version, I was using 1.5 though I installed sun 1.6, your solution worked perfectly! Thanks man!
Cheers;
If you like Eclipse, I think you will adore NetBeans : )
http://kevin.vanzonneveld.n...
Thanks! The eclipse outline for pdt doesn\'t work without this fix either.