【发布时间】:2014-07-14 16:37:13
【问题描述】:
我有一个 mavenized GWT 项目,使用 mvn gwt:run 运行得非常好。
如果我将它导入 Eclipse 并尝试作为 Web 应用程序运行,我会收到错误 Main type not specified(见下文)。
如何才能在 Eclipse 中运行和调试 GWT 应用程序?
更新 1: 指定主类后,我得到另一个错误:
更新 2:.classpath 文件如下所示:
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry combineaccessrules="false" kind="src" path="/Project1"/>
<classpathentry combineaccessrules="false" kind="src" path="/Project2"/>
<classpathentry combineaccessrules="false" kind="src" path="/Project3"/>
[...]
<classpathentry kind="output" path="src/main/webapp/WEB-INF/classes"/>
</classpath>
【问题讨论】: