jlink'ed javac misses --release support and numbers

Christian Stein sormuras at gmail.com
Fri Nov 13 15:07:43 UTC 2020


When creating a custom runtime image via jlink that includes
module jdk.compiler and its dependencies, the resulting javac tool of that
image doesn't support the --release option.

The error message reads, using 16-ea+24 as the basis and --release 16 on
the command:

  release version 16 not supported
    Usage: javac <options> <source files>
    use --help for a list of possible options

Running javac --help from within the custom image lacks all numbers:
  --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

The help texts for options --source and --target do show all numbers.

Am I missing something? Perhaps an internal(?) module that contains the API
definitions used by javac?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20201113/151efd4e/attachment.htm>

More information about the compiler-dev mailing list