GWT/Eclipse:ClassNotFoundException com/google/gwt/dev/Compiler [英] GWT/ Eclipse: ClassNotFoundException com/google/gwt/dev/Compiler
问题描述
我最近从 GWT 2.0.4 更新到 2.1.0.从那以后,我无法再编译我的 GWT 应用程序.当我单击 GWT eclipse 插件的 GWT 编译按钮时,出现以下错误:
i recently updated from GWT 2.0.4 to 2.1.0. Since then I cannot compile my GWT application anymore. When I click on the GWT compile button of the GWT eclipse plugin I get the following error:
java.lang.NoClassDefFoundError: com/google/gwt/dev/Compiler
Caused by: java.lang.ClassNotFoundException: com.google.gwt.dev.Compiler
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Exception in thread "main"
此外,我无法在 Eclipse 中创建新的 GWT 项目.在新的 New Web Application Project 对话框中,可以选择使用 GWT 和/或 Google App Engine.检查使用gwt"时,错误对话框提出,表示:创建元素失败.原因:调用 com.google.gwt.user.tools.WebAppCreator 失败.有关详细信息,请参阅错误日志."
Also I can't create a new GWT project in Eclipse. In the new New Web Application Project Dialog one can choose to use GWT and/or Google App Engine. When check "Use GWT" a error dialog raises up which says: "Creation of element failed. Reason: Invocation of com.google.gwt.user.tools.WebAppCreator failed. See the error log for more details."
在日志文件 (
) 中,我可以看到消息:
In the log file (<workspace>/.metadata/.log
) I can see the message:
!ENTRY org.eclipse.jdt.ui 4 10001 2010-11-02 08:34:50.085
!MESSAGE Internal Error
!STACK 1
Java Model Exception: Core Exception [code 0] Invocation of com.google.gwt.user.tools.WebAppCreator failed. See the error log for more details.
at org.eclipse.jdt.internal.core.BatchOperation.executeOperation(BatchOperation.java:50)
at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:728)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975)
at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:4777)
at org.eclipse.jdt.internal.ui.actions.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:106)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Caused by: org.eclipse.core.runtime.CoreException: Invocation of com.google.gwt.user.tools.WebAppCreator failed. See the error log for more details.
at com.google.gwt.eclipse.core.runtime.tools.WebAppProjectCreatorRunner.createProject(WebAppProjectCreatorRunner.java:53)
at com.google.gdt.eclipse.suite.wizards.WebAppProjectCreator.createGWTProject(WebAppProjectCreator.java:532)
at com.google.gdt.eclipse.suite.wizards.WebAppProjectCreator.create(WebAppProjectCreator.java:294)
at com.google.gdt.eclipse.suite.wizards.NewWebAppProjectWizard.finishPage(NewWebAppProjectWizard.java:147)
at org.eclipse.jdt.internal.ui.wizards.NewElementWizard$2.run(NewElementWizard.java:117)
at org.eclipse.jdt.internal.core.BatchOperation.executeOperation(BatchOperation.java:39)
at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:728)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975)
at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:4777)
at org.eclipse.jdt.internal.ui.actions.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:106)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
!SUBENTRY 1 com.google.gwt.eclipse.core 4 0 2010-11-02 08:34:50.085
!MESSAGE Invocation of com.google.gwt.user.tools.WebAppCreator failed. See the error log for more details.
gwt-dev.jar、gwt-user.jar 和许多其他 google-jar 都在类路径中...
gwt-dev.jar, gwt-user.jar and many other google-jars are in the classpath...
有没有人知道如何解决这个问题?我还设置了一个新的全新 Eclipse 安装,安装了新的 GWT 插件,并选择了一个新的工作区目录,但这仍然给我错误...
Does anyone have an idea how to solve this issue? I also set up a new fresh Eclipse installation, installed the new GWT plugin, and chose a new workspace directory, but this still gives me the errors...
附加信息:
- Windows XP,
- 用于 Java EE 3.6 Helios 的 Eclipse,
- J2EE/Java 1.6.0_22-b04
- Eclipse 3.6 1.4.0.v201010280102 的 Google 插件
- Google App Engine Java SDK 1.3.8 1.3.8.v201010161055
- Google 网络工具包 SDK 2.1.0 2.1.0.v201010280102
推荐答案
我遇到了同样的问题,无法在 Eclipse 中创建新的 GWT 项目.从我的 windows 环境变量中删除 Classpath 变量(显然干扰了 Eclipse 中的设置)为我解决了这个问题.
I had the same problem not being able to create a new GWT-project in Eclipse. Removing the Classpath variable from my windows environment variables (appearently interfering with the settings in Eclipse) solved the problem for me.
这篇关于GWT/Eclipse:ClassNotFoundException com/google/gwt/dev/Compiler的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!