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

create --source --target synonyms for -source -target

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P3 P3
    • 12
    • tools
    • None
    • behavioral
    • minimal
    • New options are added that are just synonyms for existing options.
    • add/remove/modify command line option
    • JDK

      Summary

      Add --source and --target as synonyms for the javac options -source and -target.

      Problem

      Although the java --source option is functionally distinct from the javac -source option, both may be used in conjunction with the recently-new --enable-preview option added for JEP 12. It is confusing to tell people that they can use:

      $ javac --enable-preview -source N ...

      but must use

      $ java --enable-preview --source N ...

      Solution

      Add --source as a synonym for the javac option -source. SInce there is a triad of related options, -source, -target, and -release, it makes sense to add a synonym for -target as well.

      For consistency, --source should be added as a synonym for the javadoc option -source. (javadoc does not have a -target option.)

      Specification

      The new options --source and --target are synonyms for -source and -target.

      There are no other changes.

            jjg Jonathan Gibbons
            jjg Jonathan Gibbons
            Jan Lahoda, Maurizio Cimadamore
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: