Getting “java.lang.NoClassDefFoundError: com/beust/jcommander/ParameterException”Exception

后端 未结 4 2031
梦谈多话
梦谈多话 2021-01-13 12:46

I wanted to invoke testng programmatically. Not eclipse plug-in.

I have associated \"testng-6.8.21.jar\" and running through eclipse and i ran below code:

         


        
4条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-13 13:26

    If you use a Maven project, you need add this dependancy:

    
        com.beust
        jcommander
        1.48
    
    

    the class com/beust/jcommander/ParameterException is inside

    If you use a project without Maven you need add this jar file at your classpath:

    jcommander-1.48.jar
    

    You can download this jar file on central.maven.org -> jcommander-1.48.jar

提交回复
热议问题