[JAVA] How to hide args4j default

Overview

I was using args4j the other day and suffered from the following phenomena. The default part is automatically generated.

-h (--help)    : print usage message and exit (default: true)
-v (--version) : print version (default: false)

solution

Looking at the API specification, it seems that the method withShowDefaults returns true by default, so I will pass false.

ParserProperties parserProps = ParserProperties.defaults().withShowDefaults(false);
-h (--help)    : print usage message and exit 
-v (--version) : print version 

default is no longer displayed.

reference

API specifications https://args4j.kohsuke.org/args4j/apidocs/org/kohsuke/args4j/ParserProperties.html

Recommended Posts

How to hide args4j default
How to hide scrollbars in WebView
How to deploy
How to change Finder's default text editor to Atom
How to hide null fields in response in Java
How to develop OpenSPIFe
How to call AmazonSQSAsync
How to use Map
How to write Rails
How to use rbenv
How to use letter_opener_web
How to use with_option
How to use fields_for
How to use map
How to use collection_select
How to adapt Bootstrap
How to use Twitter4J
How to use active_hash! !!
How to install Docker
How to use MapStruct
How to use hidden_field_tag
How to use TreeSet
How to write dockerfile
How to uninstall Rails
How to install docker-machine
[How to use label]
How to make shaded-jar
How to write docker-compose
How to use identity
How to use hashes
How to write Mockito
How to create docker-compose
How to use JUnit 5
How to install MySQL
How to write migrationfile
How to build android-midi-lib
How to use Dozer.mapper
How to use Gradle
How to use org.immutables
How to use java.util.stream.Collector
How to use VisualVM
How to use Map
How to install ngrok
How to type backslash \
How to concatenate strings
How to check only one RadioButton check by default (Note)
Summary of how to implement default arguments in Java
How to delete BOM (UTF-8)
How to create an application
[Java] How to use Map
How to resolve Sprockets :: DoubleLinkError
[rails] How to post images
How to resolve Git conflicts
How to use Chain API
[Java] How to use Map
How to use Priority Queuing
How to uninstall Java 8 (Mac)
How to write good code
Java --How to make JTable
How to handle uploaded images
How to add ActionText function