title: How to run testng.xml from Command Prompt using org.testng.TestNG
body: <p>I am trying to run testng.xml from command prompt. This is the command I'm running:</p>
  
  <pre><code>C:\Users\sathmakur&gt;java -cp C:\Users\sathmakur\.m2\repository\org\testng\testng\
  6.3.1\testng-6.3.1.jar org.testng.TestNG test.xml
  </code></pre>
  
  <p>I get the following error:</p>
  
  <pre><code>Exception in thread "main" java.lang.NoClassDefFoundError: com/beust/jcommander/ ParameterException
          at java.lang.Class.getDeclaredMethods0(Native Method)
          at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
          at java.lang.Class.getMethod0(Unknown Source)
          at java.lang.Class.getMethod(Unknown Source)
          at sun.launcher.LauncherHelper.getMainMethod(Unknown Source)
          at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source) Caused by: java.lang.ClassNotFoundException: com.beust.jcommander.ParameterExcep tion
          at java.net.URLClassLoader$1.run(Unknown Source)
          at java.net.URLClassLoader$1.run(Unknown Source)
          at java.security.AccessController.doPrivileged(Native Method)
          at java.net.URLClassLoader.findClass(Unknown Source)
          at java.lang.ClassLoader.loadClass(Unknown Source)
          at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
          at java.lang.ClassLoader.loadClass(Unknown Source)
          ... 6 more
  </code></pre>
  
  <p>I'm new at using TestNG and Command Prompt. It would be a great help if someone could shed some light. </p>