论坛首页 入门讨论版

在eclipse中使用ant的<junit> task

浏览 926 次
该帖已经被评为新手帖
作者 正文
时间:2007-04-27 关键字: eclipse junit task

build.xml中定义junit task

<taskdef name="junit" classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask"/>

默认情况下会报错

eclipse org.apache.tools.ant.taskdefs.optional.junit.JUnitTask cannot be found: junit/ framework/TestListener

解决方案:

 Window --> Preferences, Ant --> Runtime-->Classpath-->Global Entries

添加junit.jar

   
论坛首页 入门讨论版

跳转论坛:
JavaEye推荐