This section contains the detail about JUnit Installation & classpath setting.
JUnit Installation & classpath setting
First, download the latest version of JUnit, referred as junit4.x.x.zip from given below link :
http://sourceforge.net/projects/junit/files/
Then install JUnit on your platform of choice :
Windows
To install JUnit on Windows, follow these steps:
1.Unzip the junit.zip distribution file to a directory referred to as
%JUNIT_HOME%.
2. Add JUnit to the classpath:
set CLASSPATH=%CLASSPATH%;%JUNIT_HOME%\junit.jar
Unix (bash)
To install JUnit on Unix, follow these steps:
1.Unzip the junit.zip distribution file to a directory referred to as
$JUNIT_HOME.
2.Add JUnit to the classpath:
export CLASSPATH=$CLASSPATH:$JUNIT_HOME/junit.jar
Example
In windows environment , we can add JUnit to the class path as follows :
set CLASSPATH=C:\Program Files\Java\junit4.8.1\junit-4.8.1.jar
[ 0 ] Comments