ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Krzysztof Harpula <>
Subject Using Ivy launcher, passing arguments to launched class.
Date Wed, 22 Jul 2015 13:47:04 GMT

I have the following problem:

I want to launch my main class using Ivy launcher as documented in Ivy

java -jar ivy.jar -main

My main class  expects parameters from command line in the format:

I try using Ivy launcher with -args option which is documented as follows:

-args <args> the arguments to give to the launched process

java -jar ivy.jar -main -args -param1:val1

However Ivy is not able to pass such a parameter into my class as it
interprets it as Ivy parameter which is not recognized printing: 
Unrecognized option: -param1:val1. (message from Ivy launcher)

So if I try what follows (remove "-" from my parameter):

java -jar ivy.jar -main -args param1:val1

Ivy passes param1:val1 as argument to my main however my application
does not recognize it as it expects its all parameters to start with "-"
just as Ivy launcher does.

I think this is either a *BUG* or I am missing something. It seems Ivy
launcher interprets  values after -args beginning with "-" as another
Ivy parameters. Is any way to pass parameters starting with "-" to the
launched class? Please help.

Best regards.

View raw message