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

Javap -help should provide information about --multi-release option

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P4 P4
    • 13
    • tools
    • None
    • behavioral
    • minimal
    • Documenting an existing (undocumented) option
    • add/remove/modify command line option
    • JDK

      Summary

      Document javap support for the --multi-release option.

      Problem

      javap indirectly supports the --multi-release option because it is an option on the underlying file manager (assuming the default file manager is in use.) But the option is not documented, meaning there is no documented/supported way to specify the version to use in a multi-release jar file.

      Solution

      The jdeps tool sets a precedent of supporting a --multi-release option. javap uses that precedent to justify supporting a similar option, with a similar specification.

      An alternative that was considered was to support --release, following the precedent in the javac and javadoc tools. However, a user using the --release option might reasonably expect that it would be able to access historical data for older versions of the platform classes. While that is an interesting idea, it is out of scope for this specific request.

      Specification

      A new option is added:

      --multi-release <version>

      Specifies the version when processing multi-release jar files.
      <version> should be one of:

      • an integer >= 9
      • base
      • runtime

      If the option is not used the specify a version, the default (base) version will be used.

            jjg Jonathan Gibbons
            anazarov Andrey Nazarov (Inactive)
            Mandy Chung (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: