I just run a simple test with testNG(version 6.8). All code is like this.
import org.testng.annotations.*;
public class TestNGtest {
@Test
public void test(){
System.out.print("123");
}
}
I run it but it returns :
Exception in thread "main" java.lang.NoClassDefFoundError: com/beust/jcommander/ParameterException
at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:119)
Caused by: java.lang.ClassNotFoundException: com.beust.jcommander.ParameterException
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 1 more
BUT there is jcommander.jar in my classpath(in my java/jre/lib) already. someboby has the same problem?
It is a maven project, i have added jcommander ,testng dependencies in my pom.xml ; these code is all fine when run on other computers ,but only throws this error on my computer(i cloneed it from git). Can anybody help me?