title: TestNG Cannot find class in classpath
body: <p>I am getting <code>Cannot find class in classpath: testng.unitTest</code> error. I have seen many posts on this issue and tried all the possible ways, but nothing worked. TestNG is working fine on Eclipse. <strong>When I run it from command line, it is throwing error</strong>. I did setup classpath correctly, have all the jar files in lib folder. Testng.xml file is located in project directory. What could be the problem? </p>
  
  <pre><code>&lt;!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" &gt;
  &lt;suite name="Sample test Suite"&gt;
     &lt;test name="Sample test"&gt;
      &lt;classes&gt;
        &lt;class name="testng.unitTest" /&gt;
      &lt;/classes&gt;
    &lt;/test&gt;
  &lt;/suite&gt;
  </code></pre>
  
  <p>execution from command line</p>
  
  <pre><code>C:\workspace\selenium&gt; java -cp "C:/workspace/selenium/lib/testng.jar;C:/workspace/selenium/lib/jcommander.jar" org.testng.TestNG testNG.xml
  </code></pre>