Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

passing commandline parameter to ant not working

 
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
Marshal
Posts: 34974
379
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