Java commons-cli, options with list of possible values
apache-commons, apache-commons-cli, command-line, command-line-interface, java
Solution
Since commons-cli doesn't support that directly, the simplest solution is probably to check the value of an option when you get it.
Problem
How can I make an option accept only some specified values like in the following example: ``` $ java -jar Mumu.jar -a foo OK $ java -jar Mumu.jar -a bar OK $ java -jar Mumu.jar -a foobar foobar is not a valid value for -a ```