1. Apache Commons CLI: 2. JCommander: 3. picocli: import picocli.CommandLine; import picocli.CommandLine.Command; import picocli.CommandLine.Option; @Command(name = "myapp", mixinStandardHelpOptions = true, version = "1.0", class MyApp implements Runnable { private String username; private String password; public void run() { } public static void main(String[] args) { CommandLine.run(new MyApp(), args); } }


上一篇:
下一篇:
切换中文