Can we use -source 1.8 for 8u60?

Jonathan Gibbons jonathan.gibbons at oracle.com
Sat Feb 21 00:25:01 UTC 2015


Generally, the rule is that most of the code base for any JDK N
is that it can use -source N.

The primary exception is the code for javac, which is constrained
to use -source N-1 and the API for JDK N-1.  This constraint allows
us to build a version of javac which can be used to build the rest
of JDK.

-- Jon

On 02/20/2015 07:07 AM, Stanislav Baiduzhyi wrote:
> On Friday 20 February 2015 15:57:33 Mario Torre wrote:
>> Wouldn't that make it impossible to build with a jdk7?
> Lambda expressions are already used in jdk8 MetalLookAndFeel:
>
> $ grep -e '->'
> jdk/src/share/classes/javax/swing/plaf/metal/MetalLookAndFeel.java
>          LazyValue dialogBorder = t -> new MetalBorders.DialogBorder();
>          LazyValue questionDialogBorder = t -> new
> MetalBorders.QuestionDialogBorder();
>              "ToolBar.rolloverBorder", (LazyValue) t ->
> MetalBorders.getToolBarRolloverBorder(),
>              "ToolBar.nonrolloverBorder", (LazyValue) t ->
> MetalBorders.getToolBarNonrolloverBorder(),
>              "RootPane.frameBorder", (LazyValue) t -> new
> MetalBorders.FrameBorder(),
>              "RootPane.errorDialogBorder", (LazyValue) t -> new
> MetalBorders.ErrorDialogBorder(),
>              "RootPane.warningDialogBorder", (LazyValue) t -> new
> MetalBorders.WarningDialogBorder(),
>
> So I would assume that to use or not to use Java 8 source constructs depends
> on where exactly you want to use them.
>
>
>> 2015-02-20 15:50 GMT+01:00 Attila Szegedi <attila.szegedi at oracle.com>:
>>> Quick question: are we allowed to use Java 8 source constructs for code
>>> going into 8u-dev for 8u60? I'd need to evolve an interface in Nashorn by
>>> adding a method to it and would like to provide a default implementation
>>> for it.



More information about the jdk8u-dev mailing list