Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot run/debug Java applications in Eclipse (JavaTimeZone issue)

I'm trying to get started with Eclipse/Java/Scala on a MacBook. The installed JDK was 1.5. The SDT plugin for Scala requires 1.6 which was included in an OS update, but I also manually installed a package from Apple to update 1.6. The problem is that I cannot run anything from Eclipse. I always get the following error:

An internal error occurred during: "Launching TestFooBasicTest". Could not initialize class com.ibm.icu.impl.JavaTimeZone

I also tried to use the old 1.5 version, but to no avail.

What is going wrong here?

like image 539
Andre Avatar asked Oct 12 '09 08:10

Andre


1 Answers

I had the same problem trying to run a scala program with Ubuntu 10.4 and stock eclipse (Galileo 3.5.2) and java (java-6-openJdk ) - and the scala pluging downloaded from scala site, of course. I fixed it by manually changing /usr/lib/eclipse/plugins/com.ibm.icu_4.0.1.v20100125.jar as suggested in this thread (btw I discovered that Emacs can change a jar file in place: nice):

http://www.eclipse.org/forums/index.php?t=msg&goto=488654

It's caused by ubuntu openjdk package with broken symbol links for TimeZone configuration. The best solution from forum thread is,

Reinstalling tzdata-java was the fix for me:

sudo apt-get --reinstall install tzdata-java
like image 55
F.B Avatar answered Nov 15 '22 18:11

F.B