Question

Is there a proper way of handling options using Apache Commons CLI without a hyphen? So instead of entering "-help" a normal "help" should also work? Or is this not possible/intended because an option would be no longer distinguishable from an argument?

Was it helpful?

Solution

Or is this not possible/intended because an option would be no longer distinguishable from an argument?

Absolutely, that's the reason. And all the libraries I know use the hyphen.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top