GWT Junit-错误=';没有看到该类型的编译单元';

GWT Junit-错误=';没有看到该类型的编译单元';,gwt,junit,Gwt,Junit,我正在尝试在示例应用程序中运行GWT单元测试。我跑 cmd /c /java/gwt-windows-1.6.4/webAppCreator.cmd -out gwttasks com.gwttasks.GwtTasks cmd/c/java/gwt-windows-1.6.4/webAppCreator.cmd-out gwttasks com.gwttasks.gwttasks 将junit-4.5.jar中的内容复制到lib目录中,并将其添加到类路径中 跑步: cmd/c/java/gwt

我正在尝试在示例应用程序中运行GWT单元测试。我跑

cmd /c /java/gwt-windows-1.6.4/webAppCreator.cmd -out gwttasks com.gwttasks.GwtTasks cmd/c/java/gwt-windows-1.6.4/webAppCreator.cmd-out gwttasks com.gwttasks.gwttasks 将junit-4.5.jar中的内容复制到lib目录中,并将其添加到类路径中

跑步:

cmd/c/java/gwt-windows-1.6.4/junitCreator.cmd-junit-lib/junit-4.5.jar-module com.gwttasks.gwttasks-eclipse gwttasks-com.gwt tasks.unit.GwtJunit 当我尝试运行任何生成的cmd文件(例如GwtJunit hosted.cmd)或任何启动文件时,我会遇到以下错误。我看到的所有网页都说要将测试源添加到类路径中,但它已经存在了,所以这不是问题所在。还有人看到这个吗

com.google.gwt.junit.JUnitFatalLaunchException: The test class 'com.gwttasks.unit.GwtJunit' was not found in module 'com.gwttasks.GwtTasks'; no compilation unit for that type was seen at com.google.gwt.junit.JUnitShell.checkTestClassInCurrentModule(JUnitShell.java:390) at com.google.gwt.junit.JUnitShell.runTestImpl(JUnitShell.java:626) ... com.google.gwt.junit.JUnitFatalLaunchException:在模块“com.gwttasks.gwttasks”中找不到测试类“com.gwttasks.unit.GwtJunit”;没有看到该类型的编译单元 在com.google.gwt.junit.JUnitShell.checkTestClassInCurrentModule(JUnitShell.java:390)上 位于com.google.gwt.junit.JUnitShell.runTestImpl(JUnitShell.java:626) ...
答案可以在这里找到:
在netbeans中,我将src/java和test添加到类路径中,调试成功了!!!!!
谢谢

我只想补充一点,我也遇到了同样的问题,因为我犯了一个(非常愚蠢的)错误,没有将GWTTestCase类放入“client”目录,而是放入了另一个目录。难怪没有找到;)

在StackOverflow上有这样的答案会很好,以防链接被破坏:*若要修复此问题,请打开“运行”对话框*单击“类路径”选项卡并单击“用户条目”。*单击高级按钮并选择添加文件夹。*在文件夹选择对话框中,选择源和测试目录(例如src/main/java和src/test/java)。 com.google.gwt.junit.JUnitFatalLaunchException: The test class 'com.gwttasks.unit.GwtJunit' was not found in module 'com.gwttasks.GwtTasks'; no compilation unit for that type was seen at com.google.gwt.junit.JUnitShell.checkTestClassInCurrentModule(JUnitShell.java:390) at com.google.gwt.junit.JUnitShell.runTestImpl(JUnitShell.java:626) ...