The best CLI parser for Java [duplicate]

2019-01-08 15:07发布

This question already has an answer here:

What CLI parser for Java is easy to use and more scalable than others?

3条回答
Fickle 薄情
2楼-- · 2019-01-08 15:45

Here are some of the most popular. They are all pretty feature complete, and having used the top two I can recommend them.

EDIT: For completeness, here are some others I've come across

查看更多
Fickle 薄情
3楼-- · 2019-01-08 15:57

I don't think scalability is a factor here. you want something which is feature complete and easy to use. I mostly use jargs but I generally dislike it's API (using it out of habit).

you can also try java getopt impl, which I did not personally used.

查看更多
爷、活的狠高调
4楼-- · 2019-01-08 15:58

JLine is a library for building shell-like applications in Java.

Since 2002, the project was hosted on SourceForge.net and last release was JLine-1.0 on April 2011.

But in 2009, the project has started the migration to GitHub.com and has released the series 2.x since November 2009 (version 2.0). Last version 2.x when writing this answer is 2.14.2 in May 2016.

In October 2016, a new series 3.x has been released.

查看更多
登录 后发表回答