commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kyle R. Burton" <>
Subject Does CLI support an option specified multiple times?
Date Tue, 17 Apr 2007 23:30:54 GMT
I've googled and looked at the docs and the answer did not stand out to me
(sorry if this is covered somewhere already).

I'm using commons-cli 1.0 and want to support options that are specified
multiple times, suc as:

  my-app -v -v -v


  my-app -Dprop1=val1 -Dprop2=val2

I see that Options has a getValues() which supports returning a String[],
though when I use the PosixParser it seems that only the first value
specified on the command line is returned by getValues() in the string

Is there a way to support a value being specified multiple times?

Thank you for your time,

Kyle R. Burton

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message