Monday, November 03, 2008

Eclipse on Fedora 9

If you are reading this post, more than likely you already know what I'm talking about.

Fedora 9 comes with their GCJ compiled version of 'Fedora Eclipse'. Nice idea, not well implemented. Trying to use Eclipse update sites do not work correctly, and/or want to use different eclipse distributions.

So, using the normal Eclipse.org distribution, or a custom distribution from various vendors, one would just download, untar/unzip, and run, right?

Wrong...you get the splash screen, loading modules, then a small grey box. Going to /.metadata/.log shows errors like this:

!ENTRY org.eclipse.ui.workbench 4 0 2008-10-14 15:35:07.364
!MESSAGE Widget disposed too early!
!STACK 0
java.lang.RuntimeException: Widget disposed too early!
at org.eclipse.ui.internal.WorkbenchPartReference$1.widgetDisposed(WorkbenchPartReference.java:171)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:117)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)

.....
org.eclipse.swt.SWTError: XPCOM error -2147467262
at org.eclipse.swt.browser.Mozilla.error(Mozilla.java:1638)
at org.eclipse.swt.browser.Mozilla.setText(Mozilla.java:1861)
at org.eclipse.swt.browser.Browser.setText(Browser.java:737)
at org.eclipse.ui.internal.intro.impl.presentations.BrowserIntroPartImplementation.generateContentForPage(BrowserIntroPartImplementation.java:252)
at org.eclipse.ui.internal.intro.impl.presentations.BrowserIntroPartImplementation.dynamicStandbyStateChanged(BrowserIntroPartImplementation.java:451)
at org.eclipse.ui.internal.intro.impl.presentations.BrowserIntroPartImplementation.doStandbyStateChanged(BrowserIntroPartImplementation.java:658)


The fix is simple...once you know what to fix. The last part, the Mozilla error, was the key. Not intuitive, but this is what you do to get an external Eclipse distribution to work on Fedora 9 with Sun or OpenJDK (not GCJ):

yum upgrade firefox

Yup, that's it. Just upgrade your Firefox install.

4 comments:

Siddiq said...
This comment has been removed by the author.
Siddiq said...

i am into same problem...
yum upgrade firefox doesnt work either...

[root@localhost eclipse-java]# yum upgrade firefox
Loaded plugins: refresh-packagekit
Setting up Upgrade Process
Could not find update match for firefox
No Packages marked for Update

dhartford said...

Make sure you are pointing to updated repos for Fedora 9. I have not tested Fedora 10 if this has the same issue or not.

Anonymous said...

I am on Fedora 11 beta. Same problem :(

yum upgrade firefox does not help (my repos are rawhide).

This is due to xulrunner version. Full details and some solutions are here:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=268651