JDK 12: RC feedback

Joe Darcy joe.darcy at oracle.com
Tue Feb 19 18:37:55 UTC 2019


Hello,

On 2/19/2019 10:05 AM, Andrew Guibert wrote:
> Regarding JEP 182, is the plan to just retire -source/-target options but leave
> --release for older versions still in tact?


No; the intention is that -source/-target and --release would all 
support the same set of arguments.


>
> 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>

I downloaded the latest Linux JDK 12 build from http://jdk.java.net/12/ 
and "6" is not listed as a valid argument to those options:

   --release <release>
         Compile for a specific release. Supported releases: 7, 8, 9, 
10, 11, 12
...
   --source <release>, -source <release>
         Provide source compatibility with specified release. Supported 
releases: 7, 8, 9, 10, 11, 12
...
   --target <release>, -target <release>
         Generate class files for specific VM version. Supported 
versions: 7, 8, 9, 10, 11, 12

Cheers,

-Joe


>
> Regards,
> Andy
>
> -----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
>
>
> Hello,
>
> 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
>       https://urldefense.proofpoint.com/v2/url?u=http-3A__openjdk.java.net_jeps_182&d=DwIDaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=1YPTKCwyTI-UsomOHDHVT2KCzhgAyrNIOkzMBdrxRsY&m=YtYjdyMRDxKWeDLxGIcIsDY-dbzr0d7cH5SmpTVO36E&s=Q9CbjRFyrcQqPVwQlQ_NpoPS2Mm99G1JVf3uLvVH6cw&e=
>
> 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
> (https://urldefense.proofpoint.com/v2/url?u=http-3A__mail.openjdk.java.net_pipermail_discuss_2017-2DSeptember_004281.html&d=DwIDaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=1YPTKCwyTI-UsomOHDHVT2KCzhgAyrNIOkzMBdrxRsY&m=YtYjdyMRDxKWeDLxGIcIsDY-dbzr0d7cH5SmpTVO36E&s=8UwfBqjzEuUzJJekW56nhc8txX1CDw7M2GMW_7s_RSk&e=)
> 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. "
>
> https://urldefense.proofpoint.com/v2/url?u=https-3A__bugs.openjdk.java.net_browse_JDK-2D8046172-3FfocusedCommentId-3D14145783-26page-3Dcom.atlassian.jira.plugin.system.issuetabpanels-3Acomment-2Dtabpanel-23comment-2D14145783&d=DwIDaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=1YPTKCwyTI-UsomOHDHVT2KCzhgAyrNIOkzMBdrxRsY&m=YtYjdyMRDxKWeDLxGIcIsDY-dbzr0d7cH5SmpTVO36E&s=PJJbyVrjddkzjC_lOGMt1t9gCxHjcbv8R_HVLfmwfUY&e=
>
> The possibility of removing -source/-target 6 from JDK 11 was discussed
> on this alias in May 2018:
>
> https://urldefense.proofpoint.com/v2/url?u=http-3A__mail.openjdk.java.net_pipermail_jdk-2Ddev_2018-2DMay_001190.html&d=DwIDaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=1YPTKCwyTI-UsomOHDHVT2KCzhgAyrNIOkzMBdrxRsY&m=YtYjdyMRDxKWeDLxGIcIsDY-dbzr0d7cH5SmpTVO36E&s=VM0GL8fbf8ZML2UxPsGk7TTW7leazpscUpvEoKPtpZk&e=
>
> 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.
>
> Cheers,
>
> -Joe
>
>
>


More information about the jdk-dev mailing list