我有一个使用Eclipse 3.5编写的现有GWT 2.0应用程序。但是当我升级到更新的Eclipse版本(3.6到3.8)时,我不再能够执行基于Eclipse的GWT编译,也无法在Eclipse中运行远程调试。具体来说,当我点击GWT编译按钮时,我在.log文件中得到以下错误条目:
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)
这是否意味着我每次升级到更新的Eclipse版本时都需要升级GWT插件,还是有办法在较新的Eclipse版本中运行较旧的GWT版本?谢谢你的时间。
答案 0 :(得分:1)
您始终可以将Eclipse或GPE更新为最新版本,然后将其指向使用GWT 2.0。
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.
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
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.
答案 1 :(得分:0)
如果你想安装GWT插件,那么
尝试新的插件。 4.2是最新插件并更新eclipse。