0

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 プラグインをアップグレードする必要があるということですか、それとも古い GWT バージョンを新しい Eclipse バージョンで実行する方法はありますか? お時間をいただきありがとうございます。

4

2 に答える 2

1

Eclipse または GPE をいつでも最新のものに更新してから、GWT 2.0 で動作するように設定できます。

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

GWT コンパイル

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.

ここに画像の説明を入力

于 2013-01-09T10:35:03.223 に答える
0

GWT プラグインをインストールする場合は、

  1. [ヘルプ] -> [新しいソフトウェアをインストール] -> このリンクをそこに貼り付け (http://dl.google.com/eclipse/plugin/2.0)、[追加] -> [OK] をクリックします。
  2. すべて選択
  3. [次へ] -> [完了] をクリックします

新しいプラグインも試してください。4.2 は最新のプラグインであり、Eclipse も更新されます。

于 2013-01-09T10:22:42.737 に答える