Have to add junit.jar to classpath?

I realize this seems like a no brainer, but when I ran my test cases in 4.0 I got the following:

java.lang.NoClassDefFoundError: junit/textui/ResultPrinter
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:115)
at com.intellij.rt.execution.application.AppMain.main(Unknown Source)
Exception in thread "main" Process terminated with exit code 1

I had junit (3.7) in my classpath from my 3.0 project. However, I had to add the IDEA junit.jar to the classpath to get junit working. Is this normal or should it have been included by default?


1 comment

You'll need to upgrade to Ant 3.8.1 (which is pretty painless). The new JUnit test-runner has a dependency on it.

--Dave Griffith


Please sign in to leave a comment.