import com.lineargs.annotation.CommandLineArgument; import com.lineargs.core.LineArgsParser; public class MyApplication { @CommandLineArgument(name = "input", description = "Input file path") private String inputFile; @CommandLineArgument(name = "output", description = "Output file path", required = true) private String outputFile; public static void main(String[] args) { MyApplication app = new MyApplication(); LineArgsParser.parse(app, args); app.run(); } private void run() { System.out.println("Input file: " + inputFile); System.out.println("Output file: " + outputFile); } }


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