JDK-8180865 : Add -source 10 and -target 10 to javac
  • Type: CSR
  • Component: tools
  • Sub-Component: javac
  • Priority: P4
  • Status: Closed
  • Resolution: Approved
  • Fix Versions: 10
  • Submitted: 2017-05-23
  • Updated: 2017-12-05
  • Resolved: 2017-05-24
Related Reports
CSR :  
Relates :  
Relates :  
Description
Summary
-------

Have `javac` recognize "10" and "1.10" as a valid arguments for the -source and -target options and 10 as a valid argument for the --release option.

Initially, the "10" arguments will just be aliases for 9 until 10-specific features are added later in the release.

Problem
-------

With a new JDK release, new source and target values are needed in `javac`,

Solution
--------

Add javac options -source 10 -source 1.10 -target 10 -target 1.10

Specification
-------------

-source 1.10
The compiler accepts code with features introduced in Java SE 10.
 
-source 10
Synonym for 1.10.
 
-target 1.10
The compiler outputs class files appropriate for the 10 platform.
 
-target 10
Synonym for 1.10.

The default source and target is also updated from 9 to 10.