Thanks to 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 agile on your C: drive, INSTALL_DIR would be:
c:\agile
Here is what students tell me:
SET CLASSPATH=.;INSTALL_DIR\junit3.8.1\junit.jar;%CLASSPATH%
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.
SET CLASSPATH=.;INSTALL_DIR\junit3.8.1\junit.jar\;*classpath*
.;INSTALL_DIR\junit3.8.1\junit.jar;
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