The resolve method as below: Add junit-[version].jar to the ant's classpath. eclipse->windows->ant->runtime->classpath