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

jdk.compiler dependency on jdk.zipfs should be declared as optional

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • None
    • tools
    • None

      Actual relation between jdk.compiler and jdk.zipfs modules is not declared and causing issues, see: #8286571

      This is follow-up enhancement proposing to declare the dependency as optional, with user informed about missing optional dependency, see pre-requisite: #8287559

      Core of this enhancement is to assure correct response of jdk.compiler on all situations where jdk.zipfs is missing, for example in:
      - java in source mode
      - javac --release
      - java --help

      Following situations have to be resolved correctly when jdk.zipfs is declared as optional module dependency and missing in the actual JDK:

          ./java --source 18 Main.java
          Exception in thread "main" java.lang.IllegalArgumentException: error: release version 18 not supported

          ./javac --release 18
          error: release version 18 not supported

          javac --help
          ...
            --release <release>
                  Compile for the specified Java SE release. Supported releases:
            -s <directory> Specify where to place generated source files
            --source <release>, -source <release>
                  Provide source compatibility with the specified Java SE release. Supported releases: 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19
          ...

            asotona Adam Sotona
            asotona Adam Sotona
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: