Menu
  • HOME
  • TAGS

How to print help using jcommander?

java,jcommander

Find this small snippet to show the application help. Fore simplicity everthing was done in one class. public class JCommanderExample { @Parameter(names = "-debug", description = "Debug mode") private boolean debug = false; @Parameter(names = "--help", help = true) private boolean help = false; public static void main(String[] args) {...