Problem with Eclipse and Ubuntu

Recently, I had a nasty problem with Eclipse in my Ubuntu Box. The GUI would not show me the code for some of my source files, saying that the text window couldn’t be displayed due to an internal error. For other files, it would display the code, but mark every line as an error, with spurious reasons like “can’t instance org.eclipse.something” or “java.util is not a valid library” or something similar.

The first time it happened to me, it was because Eclipse was wrongly using the Gnu Java compiler, instead of Sun’s JDK 1.6. I corrected the links with ‘update-alternatives’, and all was well.

Now it happened again to me earlier this week. This time out, I made sure that the GJC did not have a higher priority than sun’s java, but still the error remained. Today I found out that, for some reason, the fault was of the “system library” of the project. The system library was set to the “default” (sun’s java 1.6). When I manually set the path for the 1.6 library, eclipse started working again.

Hmmm. I feel like I have just patched the symptoms, instead of really solving the problem, but at least my system is working now. Hope this helps other people - and if anyone has a more “solid” way of fixing my system, feel free to comment.

Leave a Reply


"The secret of happiness is total disregard of everybody."
Fortune file