Posted on 2005-04-14
I've been searching all over trying to understand why I can't get JUnit to work to no avail. Here's what I've done, exactly as the instructions say:
>>>>How do I install JUnit?
>>>>First, download the latest version of JUnit, referred to below as junit.zip.
>>>>Then install JUnit on your platform of choice:
>>>>To install JUnit on Windows, follow these steps:
>>>>Unzip the junit.zip distribution file to a directory referred to as >>>>%JUNIT_HOME%.
>>>>Add JUnit to the classpath:
Unfortunately, the next step, testing the installation, fails
>>>>Test the installation by using either the textual or graphical test runner to run >>>>the sample tests distributed with JUnit.
>>>>Note: The sample tests are not contained in the junit.jar, but in the installation >>>>directory directly. Therefore, make sure that the JUnit installation directory is in >>>>the CLASSPATH.
>>>>For the textual TestRunner, type:
>>>>java junit.textui.TestRunner junit.samples.AllTests
>>>>For the graphical TestRunner, type:
>>>>java junit.swingui.TestRunner junit.samples.AllTests
>>>>All the tests should pass with an "OK" (textual) or a green bar (graphical).
>>>>If the tests don't pass, verify that junit.jar is in the CLASSPATH.
The following appears from the command line:
>Class not found "junit\samples\AllTests"
I've tried altering the path lto AllTests like so:
according to the paths leading to the c: directory with the same results.
Command line 'set' reveals that junit.jar is in the classpath.
What am I doing wrong?
I'm just beginning in this, so if you explain something, especially about environmental variables and classpaths, etc. please explain fully.