title: Unable to execute TestNG Suite file via command line
body: <p>I am trying to execute a TestNG Suite file via the command line in order to initiate a regression run.
  Currently I am doing this through my Eclipse IDE successfully by right-click on the "testng.xml" file then selecting Run As > TestNG Suite.</p>
  
  <p>However, when I try to run it via the command line, I get an error message. Steps below:</p>
  
  <ul>
  <li>I navigate to the directory where my "testng.xml" file is saved. e.g. C:\Users\xxx\Documents\eclipse projects\Automated Testing\config </li>
  <li><p>Run the command: </p>
  
  <p><code>java org.testng.TestNG testng.xml</code></p></li>
  </ul>
  
  <p>The above command generates the below response:</p>
  
  <pre><code>Error: Could not find or load main class org.testng.TestNG
  </code></pre>
  
  <ul>
  <li><p>I tried setting the classpath to include all of the selenium and testNG Jar files as per below:</p>
  
  <p><code>set classpath C:/Users/xxxx/Downloads/selenium-java-2.25.0/selenium-2.25.0/libs/*</code></p></li>
  </ul>
  
  <p>However, this generates the below error message:</p>
  
  <pre><code>Environment variable classpath C:/Users/xxxx/Downloads/selenium-java-2.25.0/selenium- 2.25.0/libs/* not defined
  </code></pre>
  
  <p>I have looked on the testNG Documentation (<a href="http://testng.org/doc/documentation-main.html" rel="nofollow">http://testng.org/doc/documentation-main.html</a>) and this just says that testNG has to be in your classpath, so now I am a bit stuck. Any help would be greatly appreciated.</p>