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.
- csr of
-
JDK-8210555 create --source --target synonyms for -source -target
-
- Resolved
-