Copy the JUnitX jar file to your favourite library path and add it to the classpath for your compiler and VM, that's it.

If you want to compile code using JUnitX you might run a command like this:

 javac -classpath lib/junit-3.7.jar:lib/junitx-5.1.jar:classes src/*.java


Running the Swing UI works like in the following example:

 java -classpath lib/junit-3.7.jar:lib/junitx-5.1.jar:classes
  junit.swingui.TestRunner tests.TestPackage


The text UI can be started using a command like:

 java -classpath lib/junit-3.7.jar:lib/junitx-5.1.jar:classes
  junit.textui.TestRunner tests.TestPackage


Building JUnitX

  1. Create a path like junitx somewhere.

  2. Unzip the sources within that path.

  3. Edit build/xptools.xml to match your system configuration.

  4. On Windows edit ant.bat so that ANTPATH is correct in order to process xptools.xml. On Unix change ant.sh.

  5. Now run

     ant.sh xptools-help

    to get help on the available build targets on Unix. Use ant.bat on Windows. Starting ant without arguments will compile the available sources. Other interesting targets are

     ant.sh jars

    to build the jar archives and

     ant.sh dist

    to create the distribution files.

A final note: You can do nearly nothing with a MS-DOS box on Windows and ant.bat. The reason is that the default environment space is too small. So it is no fun to try to build JUnitX since all path names have to be really really short. I have no time to figure out for every Windows variant how to fix this, I suggest you switch to a serious operating system if you want to develop Java software since there are many more problems with Windows.

© 2001 A. Heilwagen