Main goal of this question is to create a table with easy-to-use, wide-spread (more or less) Java CLI libraries (and their features). So, if someone need such library, he could select one from this page, filtering table for required features.
Java CLI libraries and features table.
If you want to update this table, you should edit CSV-data at the end of this answer. Copy data to file, import file to GoogleDocs spreadsheet. Share spreadsheet for read-only with everyone and replace the link above.
Abbreviations used in table:
Comment: In all cases below by Maven assumed Maven Central Repository and by Ivy - IvyRoundup Repository.
Commons CLI - examples
JOpt Simple - examples
args4j - example
JCommander - all examples on the main page
CSV-data for shared editing of table. It is good to update link at the top of this answer at the same revision as you update CSV-data. But it's also could be updated later.
Records in table sorted according to Google-query "Java CLI". More cited results will be first and no one could said that I was biased.
Name,Date of latest release,Latest version available from Maven/Ivy,Number of available versions for Maven/Ivy,Uses annotations to provide arguments format,Generates usage text for all arguments,Support for at least one additional level of subarguments,Internationalization Commons CLI,2015-06-17,1.3.1,5,n,y,n,n JOpt Simple,2016-09-25,5.0.3,23,n,y,n,n args4j,2016-01-31,2.33,31,y,y,n,n JCommander,2017-02-12,1.64,31,y,y,y,y
I normally did go to args4j for all CLI needs but lately I'm using mostly JCommander which is missing from your list. What I would never use is Commons CLI since like most commons libraries there is little activity and better solutions are available.
JCommander is also available here on github with the last commit being 3 days ago.
Your requirement of subarguments is probably solved best with JCommander's commands which are explained in context of the GIT CLI on its webpage.
Usage generation is supported, based on the descriptions enclosed the @Parameter
annotation.
Here is the CSV line for JCommander for your table:
jcommander,2012-01-11,1.23,19,y,y,y
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With