Exception in thread "main" com.beust.jcommander.ParameterException: Unknown option

2,462 views
Skip to first unread message

Seema Yadav

unread,
Nov 15, 2016, 2:40:49 PM11/15/16
to testng-users

Exception in thread "main" com.beust.jcommander.ParameterException: Unknown option: -Dstage=Devo

at com.beust.jcommander.JCommander.parseValues(JCommander.java:723)

at com.beust.jcommander.JCommander.parse(JCommander.java:275)

at com.beust.jcommander.JCommander.parse(JCommander.java:258)

at com.beust.jcommander.JCommander.<init>(JCommander.java:203)

at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:43)


Getting this error , couldn't able to figure out . 

I am using eclipse luna .

 

Cédric Beust ♔

unread,
Nov 15, 2016, 2:41:32 PM11/15/16
to testng...@googlegroups.com
Make sure you pass this option to the JVM and not to TestNG.

-- 
Cédric


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

Seema Yadav

unread,
Nov 16, 2016, 10:03:47 AM11/16/16
to testng-users, ced...@beust.com
testng needs some arugments to run the test ,so only passing the arguments to testng 


On Wednesday, November 16, 2016 at 1:11:32 AM UTC+5:30, Cédric Beust ♔ wrote:
Make sure you pass this option to the JVM and not to TestNG.

-- 
Cédric


On Tue, Nov 15, 2016 at 11:39 AM, Seema Yadav <syad...@gmail.com> wrote:

Exception in thread "main" com.beust.jcommander.ParameterException: Unknown option: -Dstage=Devo

at com.beust.jcommander.JCommander.parseValues(JCommander.java:723)

at com.beust.jcommander.JCommander.parse(JCommander.java:275)

at com.beust.jcommander.JCommander.parse(JCommander.java:258)

at com.beust.jcommander.JCommander.<init>(JCommander.java:203)

at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:43)


Getting this error , couldn't able to figure out . 

I am using eclipse luna .

 

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to testng-users...@googlegroups.com.

Krishnan Mahadevan

unread,
Nov 16, 2016, 10:25:47 AM11/16/16
to testng-users, ced...@beust.com

Seema

What Cedric meant was that you pass in JVM arguments before you mention the main method of TestNG. Anyways, can you please share the full command that you are using which is triggering the issue ?

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/

My Technical Scribbings @ http://rationaleemotions.wordpress.com/

Sriharsha A

unread,
Nov 16, 2016, 10:48:57 AM11/16/16
to testng...@googlegroups.com, ced...@beust.com

Hi Seema,

You should add jcoomamder.jar to your eclipse project class path . It should work.

Thanks,
Sriharsha


To unsubscribe from this group and stop receiving emails from it, send an email to testng-users+unsubscribe@googlegroups.com.

To post to this group, send email to testng...@googlegroups.com.
Visit this group at https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to testng-users+unsubscribe@googlegroups.com.

Krishnan Mahadevan

unread,
Nov 16, 2016, 11:11:12 AM11/16/16
to testng-users

Sriharsha

No it's not a problem related to jcommander jar not available in the class path.

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/

My Technical Scribbings @ http://rationaleemotions.wordpress.com/

Reply all
Reply to author
Forward
0 new messages