com.beust.jcommander.ParameterException

3,157 views
Skip to first unread message

Blaise

unread,
May 2, 2013, 7:56:33 AM5/2/13
to testn...@googlegroups.com
Hi all@testng-dev,

Sorry in advance if this topic has been discussed before, but there is an interesting thing
happening when running TestNG from the command line:

java -classpath testng-6.8.1.jar org.testng.TestNG
Exception in thread "main" java.lang.NoClassDefFoundError: com/beust/jcommander/ParameterException
Caused by: java.lang.ClassNotFoundException: com.beust.jcommander.ParameterException
   at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
   at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:247)


Is there anything I can do to avoid this issue? My JVM is following:

java version "1.6.0_45"
Java(TM) SE Runtime Environment (build 1.6.0_45-b06-451-10M4406)
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01-451, mixed mode)


Did JCommander become an external dependency that I now need to add separately to the classpath?

Thanks for your help,
Regards

B

Cédric Beust ♔

unread,
May 3, 2013, 11:24:14 AM5/3/13
to testn...@googlegroups.com
Yes. Or you could use Maven (which I strongly recommend).

The TestNG ant builds are being deprecated.


-- 
Cédric





B

--
You received this message because you are subscribed to the Google Groups "testng-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to testng-dev+...@googlegroups.com.
To post to this group, send email to testn...@googlegroups.com.
Visit this group at http://groups.google.com/group/testng-dev?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Blaise

unread,
May 7, 2013, 6:28:57 AM5/7/13
to testn...@googlegroups.com, ced...@beust.com
Yes. Or you could use Maven (which I strongly recommend).

The TestNG ant builds are being deprecated.


-- 
Cédric

Hi Cédric,

Thanks for the answer. Indeed, adding JCommander to the classpath solves the issue.

Regards
B
Reply all
Reply to author
Forward
0 new messages