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

Misleading examples in jmod man page

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • 26
    • 24
    • tools
    • 9
    • generic
    • generic

      Hello,

      The page https://docs.oracle.com/en/java/javase/24/docs/specs/man/jmod.html#jmod-create-example mentions the following command:

      ```
      jmod create --class-path mods/com.greetings --cmds commands
        --config configfiles --header-files src/h --libs lib
        --main-class com.greetings.Main --man-pages man --module-version 1.0
        --os-arch "x86_x64" --os-name "macOS"
        --os-version "10.10.5" greetingsmod
      ```

      However, the `jmod` tool does not have the options `--os-arch`, `--os-name` or `--os-version` and running such a command will result in error.

      Also, in the example for `@filename` from https://docs.oracle.com/en/java/javase/24/docs/specs/man/jmod.html#options-for-jmod, the same options are being given again.

      Please consider updating the examples to use `--target-platform` option instead.

      Note: These example exist since JDK 9.

            amihalceanu Ana-Maria Mihalceanu
            amihalceanu Ana-Maria Mihalceanu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: