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
...
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
...
- is blocked by
-
JDK-8287559 jlink should warn user about if optional dependence is not resolved
-
- New
-
- relates to
-
JDK-8286571 java source launcher from a minimal jdk image containing jdk.compiler fails with --enable-preview option
-
- Resolved
-