Intellij throws java.lang.NoClassDefFoundError: junit/textui/ResultPrinter


I just downloaded the latest Intellij4.5.3, build 2250. When I was trying to run my unit test from intellij, I got
java.lang.NoClassDefFoundError: junit/textui/ResultPrinter. I have checked my Intellij intall dir and it does have junit.jar in its lib dir.

Do I need to configure some extra things now for running unit test from the new IDE now? I don't have to do anything before to be able to run unit test form my old Intellij 3.0.5.

Any feedbacks would be highly appreciated.


Comment actions Permalink

I found out why. It is because my junit.jar in my project classpath is older than the one in intellij/Lib. After I updated my junit.jar in my project classpath, it worked. Test runs much faster than the old intellij and it has a lot more nice features.

But I still miss the fact that old intellij tells me the total number of test cases in the test file everytime when I run the test. I wonder if there is a parameter that I could pass into the new intellij so that when I run my test from IDE, it will tell me the totoal number of test cases.

Comment actions Permalink

HI, miss Xi,

where are you? I am ZHANG Jun. please write to me.

Best regards,

jun ZHANG,



Please sign in to leave a comment.