title: Error when running Junit Test from Windows Command Line
body: <p>Back 3 months ago I asked a similar question:
  <a href="https://stackoverflow.com/questions/23198687/error-when-running-junit-tests-from-dos-command-line">Error when running JUnit Tests from DOS Command line</a></p>
  
  <p>I haven't solved the problem yet so I simplified the process by trying to run a simple sample TestCase Class from my Windows DOS command line.</p>
  
  <p>My TestCase Class is:</p>
  
  <pre><code>package Test;
  import org.junit.Test;
  import org.junit.After;
  import org.junit.Before;
  public class TestCaseA 
  {
        @Before
         public void beforeMethod()
         {
             System.out.println("Before method..");
         }
  
         @Test
         public void JUnit4Test()
         {
            System.out.println("In test method");
         }
  
         @After
         public void afterMethod()
         {
            System.out.println("after method");
         }
  
  }
  </code></pre>
  
  <p>I have a folder E:\Jenkins\Test\ where my compiled .class file exists and jUnit jar insdie E:\Jenkins\Test\lib\</p>
  
  <p>See attached screen shots:</p>
  
  <p><img src="https://i.stack.imgur.com/nfV5N.jpg" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/TIFpD.jpg" alt="enter image description here"></p>
  
  <p>The command I am running to execute this from command line on a Windows Server MS DOS prompt is:</p>
  
  <pre><code>1. I Change Directory into E:\Jenkins\Test
  2. E:\Jenkins\Test&gt;java -cp E:\Jenkins\Test\junit-4.10.jar;Test\TestCaseA.class; org.junit.runner.JUnitCore Test.TestCaseA
  </code></pre>
  
  <p>The output:</p>
  
  <pre><code>JUnit version 4.10
  Could not find class: Test.TestCaseA
  
  Time: 0
  
  OK (0 tests)
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/EfOSZ.jpg" alt="enter image description here"></p>
  
  <p>What am I missing? Please help.</p>