Question

i have an existing GWT 2.0 application that i wrote using Eclipse 3.5. but when i upgraded to newer Eclipse versions (3.6 through 3.8), i was no longer able to execute Eclipse-based GWT compilation, nor run remote debugging in Eclipse. specifically, when i click on the GWT compilation button, i get the following error entry in the .log file:

java.lang.NoClassDefFoundError: org/eclipse/jdt/internal/debug/ui/SWTFactory
    at com.google.gwt.eclipse.core.compile.ui.GWTCompileDialog.createDialogArea(GWTCompileDialog.java:247)
    at org.eclipse.jface.dialogs.TitleAreaDialog.createContents(TitleAreaDialog.java:155)
    at com.google.gwt.eclipse.core.compile.ui.GWTCompileDialog.createContents(GWTCompileDialog.java:220)
    at org.eclipse.jface.window.Window.create(Window.java:431)
    at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1089)
    at org.eclipse.jface.window.Window.open(Window.java:790)
    at com.google.gwt.eclipse.core.actions.GWTCompileToolbarAction.run(GWTCompileToolbarAction.java:82)
    at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
    at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
    at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
    at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
    at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1438)

does this mean that i need to upgrade GWT plugin every time i upgrade to newer Eclipse version, or is there a way to still run older GWT versions in newer Eclipse versions? thank you for your time.

Was it helpful?

Solution

You can always update Eclipse or GPE to latest and then point it to work with GWT 2.0.

Setting up GWT 2.0 in GPE

Right Click on A Project
Step 1 -> Goto Google -> "Web Toolkit Settings" 
Step 2 -> In the Right Panel Click "Configure" 
Step 3 -> Point to GWT 2.0 folder ( download it from GWT [here][1])
Step 4 -> Ensure you select the GWT 2.0 as the default by using checking box.
Step 5 -> Select Project -> Right Click -> "Build Path" -> Configure Build Path
Step 6 -> Ensure Java Build Path shows 2.0 in the library.

enter image description here enter image description here enter image description here

Clean Compile and Debug

Select Project - In eclipse top panel do "Project -> Clean"
Step 1 - Right Click on the Project
Step 2 - Goto "Debug" as "Web Application"
Step 3 - You can GPE Hosted console in eclipse.
Step 4 - Launch the application in Brower with hosted URL

GWT Compile

Select Project
Step 1 - Right Click on the Project
Step 2 - Goto "Google" -> "Gwt Compile"
Step 3 - Configure Entrypoint module in the GWT Compile dialog. Click oK.

enter image description here

OTHER TIPS

If you want to install GWT plugin then

  1. Click Help -> install new software-> then paste this link there (http://dl.google.com/eclipse/plugin/2.0) then Add->ok
  2. Select all
  3. Click Next->Finish

Try new plugins also. 4.2 is latest plugin and update eclipse also.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top