Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8350007

Add usage message to the javadoc executable

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 25
    • None
    • tools
    • None

      Unlike most other tools, running `javadoc` without any arguments does not show you how to use the tool or point you to use the `--help` option, this can be improved.

      ```
      W $ ./java
      Usage: java [java options...] <application> [application arguments...]

      Where <application> is one of:
        <mainclass> to execute the main method of a compiled main class
        -jar <jarfile>.jar to execute the main class of a JAR archive
        -m <module>[/<mainclass>] to execute the main class of a module
        <sourcefile>.java to compile and execute a source-file program

      Where key java options include:
        --class-path <class path>
          where <class path> is a list of directories and JAR archives to search for class files, separated by ":"
        --module-path <module path>
          where <module path> is a list of directories and JAR archives to search for modules, separated by ":"
        -version
          to print product version to the error stream and exit

      For additional help on usage: java --help
      For an interactive Java environment: jshell
      W $ ./jar
      Usage: jar [OPTION...] [ [--release VERSION] [-C dir] files] ...
      Try `jar --help' for more information.
      W $ ./jpackage
      Usage: jpackage <options>
      Use jpackage --help (or -h) for a list of possible options
      W $ javadoc
      error: No modules, packages or classes specified.
      1 error
      ```

            nbenalla Nizar Benalla
            nbenalla Nizar Benalla
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: