Tuesday, September 12, 2006 9:57 PM How Ubuntu + Eclipse Failed My Friend

Don't get me wrong. I love Ubuntu. It's been a great OS for me. It is the only OS on my desktop and is the OS I use 99% of the time on my laptop.

Lately, I find myself recommending it to colleagues and friends. One of my colleagues decided to install it at work, along side his windows installation. To make one long story short, the partitioning process screwed the MBR while trying to resize his windows partition. I don't know what it did, or how I would even report a bug on this. It's not like we could recover any information from the computer on the spot, and he needs to work. So he just blew away everything, partitioned for a dual boot from the beginning. He's frustrated (and rightly so), but this is just the start.

He has heard that it has eclipse in the repositories, so he finds it and installs it. Being suitably impressed he starts it up and tries to check out our code from our CVS server. No dice. Everything works well up until the point that he views the modules available. Nothing shows up, and there is no error message. Not a single indication that anything is wrong, except that he can't list the modules. So he types in the name of a module that he knows and clicks on the 'Next' Button. Still nothing. Now he's getting frustrated again.

In eclipses log, he finds a number of error messages about missing items:


...
Caused by: java.lang.ExceptionInInitializerError
at java.lang.Class.initializeClass(libgcj.so.7)
...
Caused by: java.util.MissingResourceException: Can't find resource for bundle com/ibm/icu/impl/data/icudt34b/root.res, key CurrencyMap
at com.ibm.icu.impl.ICUResourceBundle.getImpl(ICUResourceBundle.java:397)
...


So, being a smart guy he pulls open a terminal and plays around with java on the command line, finds out that it's not the sun provided JDK. He figures this might be the problem (although, he's not certain). I walk in while he's downloading the JDK from sun. He knows that Ubuntu includes the Sun JDK, but he can't find it. The add/remove applictions doesn't list it, it only lists the JRE. He's a java developer, he wants the JDK. Synaptic doesn't list it. Then I remember, it's in multiverse/universe, so I walk him through setting those up. He tries eclipse again, still no dice. He talks to me, oh right! he needs to set it as the default java interpreter.


sudo update-alternatives --config java

Now he runs eclipse and it works.

As is turns out, the gcj compiler provided with Ubuntu by default doesn't work with eclipse and the extssh CVS module. But neither eclipse, nor gcj provide enough usable information about it. If you run eclipse from a terminal you get output similar to:

searching for compatible vm...
testing /usr/lib/jvm/java-gcj...found
java.security.NoSuchAlgorithmException: DESede/CBC/NoPadding: DESede
updatekeys: java.security.NoSuchAlgorithmException: HmacMD5
Unhandled event loop exception
Reason:
java.lang.NullPointerException


Which kind of gives you an idea, but it's not sufficient. Eclipse should catch many of these exceptions and throw up an error dialog reporting that the current VM doesn't support extssh for CVS repositories. I think it's fairly well known that gcj and eclipse have some small incompatibilities. Ubuntu should realize this and provide a warning that the current JVM will not provide full capabilities with eclipse and should link to a document explaining how to install Sun's JVM. The sun jdk package for Ubuntu should set itself as the default JVM. And there should be a configuration option under System->Adminstration->Default Java which allows you to configure this. Maybe I'll get around to writing the program at some point.

Bug reports, here and here.

It's not all negative. He was quite excited at the lack of driver-download, install, reboot cycle that usually consumes the better part of the day after a fresh windows install. He's also been happy with a number of other things with Ubuntu.

No comments:

lakin's shared items