Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

passing commandline parameter to ant not working  RSS feed

 
Padmanabh Sahasrabudhe
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have following code to which I pass j.testcase parameter. Somehow the value I pass for j.testcase is not picked up by the target run. I pass the parameter as ant run -Dj.testcase=Test2. Any comments?

 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 36406
454
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It works on my machine. -Dj.testcase=foo with the below code outputs "foo" and "match". Maybe you have a trailing space/period in your command line? Try adding an echo before the switch like I did to troubleshoot.

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!