Home
Categories
Dictionary
Download
Project Details
Changes Log
Tutorials
FAQ
License

Command-line help text


It is possible to specify the Command-line arguments file to be able to print the help content on the console when typing -help on the command-line.
  • If the help attribute is true, the application will print the supported arguments values if the -help argument is present on the command line

To have a meaningful content in the help, it is better in that case to set the desc attribute for each argument. This attribute will be used to explain what is the meaning of each argument.

Example

Suppose the following arguments file:
   <arguments help="true">
      <argument key="open" type="empty" desc="open an image"/>
      <argument key="analyze" type="empty" desc="analyze an image"/>
      <argument key="image" type="url" desc="the image file path"/>  
   </arguments>
When typing:
      java -jar MyMDI.jar -help
It will print the following text on the console:
      -analyze    analyze an image
      -image      the image file path (type = file path), for example -image=the file path
      -open       open an image

See also


Categories: Commandline

Copyright 2006-2023 Herve Girod. All Rights Reserved. Documentation and source under the LGPL v2 and Apache 2.0 licences