Configuring Java for JUnit 3.8.1 in the Windows
Thanks to former students Randy Klug, Tim Schoenfelder, and Aaron Thompson for their assistance in preparing these instructions.
The CLASSPATH is a system variable that tells your Java tools where to look for the classes it needs when compiling or executing a program. It is just a list of directories and .jar files separated by semi-colons (;).
In the discussion that follows, INSTALL_DIR refers to the path to the directory where you place your unzipped junit3.8.1 directory, including the drive specification. For example, if you place your junit3.8.1 in the subdirectory cs2530 on your C: drive, INSTALL_DIR would be:
Here is what students tell me:
This ensures that your classpath includes ., so that JUnit will be able to work with files in any directory, as well as the .jar file that contain the JUnit framework.
Capitalization doesn't matter.
The new path takes effect in each new Command Prompt window you open after setting the PATH variable.
You should now be able to run JUnit from any directory. If you want to run the tests provided with the JUnit package, then you need to either