JDK 12: RC feedback

Andrew Guibert aguibert at us.ibm.com
Tue Feb 19 18:05:12 UTC 2019

Regarding JEP 182, is the plan to just retire -source/-target options but leave
--release for older versions still in tact?

For example, according to `javac --help` a targeted release of '6' should still
be allowed (btw '12' is missing too):
$ javac --help
Usage: javac <options> <source files>
where possible options include:
--release <release>
Compile for a specific VM version. Supported targets: 6, 7, 8, 9, 10, 11

However, --release 6 is rejected:
$ bin/javac --release 6 A.java
error: release version 6 not supported
Usage: javac <options> <source files>


-----Joe Darcy <joe.darcy at oracle.com> wrote: -----
To: Andrew Guibert <aguibert at us.ibm.com>, jdk-dev at openjdk.java.net
From: Joe Darcy <joe.darcy at oracle.com>
Date: 02/19/2019 11:26AM
Subject: Re: JDK 12: RC feedback


On 2/19/2019 9:03 AM, Andrew Guibert wrote:
> Hi all,
> I am kicking the tires on the JDK 12 release candidate build, and I noticed two major pain points:
> 1) javac source/target 6 option is no longer supported
> Looking through the release notes [1] I see no mention of this change. Is it part of some more generic policy that javac will only go back N-5 versions?  Dropping source/target 6 specifically is not my primary concern, rather a more general concern of the cadence of the min compliance dropoff (JDK 9 dropped source/target 5 iirc). If this is the case I worry that by JDK 14 (about a year from now), we will no longer be able to compile down to source/target 8, which will still be a very popular runtime version in 1 years time (and still a supported version).

There is a JEP giving a policy for retiring the -source/-target (and now
--release) values:

     JEP 182: Policy for Retiring javac -source and -target Options

As noted in a comment on the issue, the policy has not be fully updated
for the new release model:

"Note that with the six month release cadence
being used starting with JDK 10, the chronical range covered by "one
plus three back" would be much shortened. In due course, this policy
will be updated accordingly, possibly taking into account LTS (long term
support) releases and possibly offering a sparse set of values. For
example, one possible policy would be to support the last two LTS
release and each release after the most recent LTS, but not the releases
between those two LTS releases. "


The possibility of removing -source/-target 6 from JDK 11 was discussed
on this alias in May 2018:


In response to community feedback, the removal was deferred from JDK 11
and implemented in JDK 12.

> 2) The java.class.version has increased (again)

The plan is to increase the class file version with each release. The
class file version acts as an implicit way to denote the minimum JDK a
jar file depends on.



More information about the jdk-dev mailing list