简体   繁体   English

在Java中解析许多复杂命令行参数的最佳方法是什么?

[英]What is the best way of parsing many complex command-line arguments in Java?

I have used getopt in Python and was hoping there would be something similar in Java. 我在Python中使用了getopt,希望在Java中有类似的东西。

Please give a reason why your answer is better than the others. 请说明为什么你的答案比其他人好。

I use Jewelcli and it's quite good. 我使用Jewelcli ,它非常好。

You can also find a discussion of different available libraries here . 您还可以在此处找到对不同可用库的讨论。

Look at Java Simple Argument Parser. 看看Java Simple Argument Parser。 Very mature and feature complete argument parser for Java. 非常成熟,功能齐全的Java参数解析器。 JSAP 司法制度评估方案

https://github.com/kohsuke/args4j - 具有相当不错的功能PLUS MIT许可证

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM