是否有良好的Java库,便于构建命令行应用程序? [英] Are there good Java libraries that facilitate building command-line applications?
问题描述
我需要在Java中编写一个简单的命令行应用程序。这将是很好,使用一个库,照顾解析命令,并照顾标志和可选/强制参数...
UPDATE <
内置TAB完成的东西会特别好。 div>
我使用 Apache Commons CLI库进行命令行参数解析。这是相当容易使用,并有相当不错的文档。
您选择的图书库可能是您喜欢的选项风格(--gnu-style或-javac-style)。
I need to write a simple command-line application in Java. It would be nice to use a library that takes care of parsing commands and takes care of things like flags and optional/mandatory parameters...
UPDATE
Something that has built-in TAB completion would be particularly great.
I've used the Apache Commons CLI library for command-line argument parsing. It's fairly easy to use and has reasonably good documentation.
Which library you choose probably comes down to which style of options you prefer ("--gnu-style" or "-javac-style").
这篇关于是否有良好的Java库,便于构建命令行应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!