【发布时间】:2022-01-20 17:33:35
【问题描述】:
@Parameters(paramLabel = "AMOUNT", description = "the depth to scrape for")
private int amount;
@Parameters(paramLabel = "ENTRY_POINT", description = "the entry point for the scrape")
private String entryPoint;
我的 Main 类中有这些参数。
当我使用ClassName 5 https://www.baeldung.com/ 运行程序时,我得到了
Missing required parameters: 'AMOUNT', 'ENTRY_POINT'
Usage: <main class> AMOUNT ENTRY_POINT
AMOUNT the depth to scrape for
ENTRY_POINT the entry point for the scrape
有人知道为什么会这样吗?
如果需要,我可以提供更多代码。
【问题讨论】:
-
这是 minimal reproducible example 有用的地方。基本上没有人能回答你的问题,除非你基本上猜测你做了什么......而如果你写了一个最小的例子,你很可能在问问题之前就发现了问题。
标签: java command-line-interface picocli