File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Agile and Other Processes and the fly likes problem installing junit Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » Agile and Other Processes
Bookmark "problem installing junit" Watch "problem installing junit" New topic

problem installing junit

Kevin Knowles
Ranch Hand

Joined: Dec 29, 2002
Posts: 45
I did a search on junit and some ranch hand said that the XP processing etc., was the best place to post junit questions. So, here I am.
My installation directory for junit is c:\junit3.
I tried the first test and got the following error message:
Exception in thread "main" java.lang.NoClassDefFoundError: junit/textui/TestRunner ...
What could I be doing wrong?
Lasse Koskela

Joined: Jan 23, 2002
Posts: 11962
Sounds like you don't have junit.jar in your classpath when running the tests?

Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Kevin Knowles
Ranch Hand

Joined: Dec 29, 2002
Posts: 45
But, I followed the installation instructions and copied the classpath to my system environment.
set classpath=%classpath%;INSTALL_DIR\junit3\junit.jar
P.S. - I'm using WindowsXP.
[ June 25, 2003: Message edited by: Kevin Knowles ]
Frank Carver

Joined: Jan 07, 1999
Posts: 6920
I'm guessing that should have been:
set classpath=%classpath%;c:\junit3\junit.jar
INSTALL_DIR is just a symbol indicating that you should use whatever directory you installed into.

Read about me at ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
Cindy Glass
"The Hood"

Joined: Sep 29, 2000
Posts: 8521
Moving to the testing forum.

"JavaRanch, where the deer and the Certified play" - David O'Meara
It is sorta covered in the JavaRanch Style Guide.
subject: problem installing junit
Similar Threads
Testing tools
Sample Java Program and codes for TestCase
Tools for testing static methods
JUnit Testing
Tools for testing static methods