Confusing javac error :)
David Holmes
david.holmes at oracle.com
Fri Nov 30 02:06:10 PST 2012
On 30/11/2012 5:15 PM, Remi Forax wrote:
> Yes, the default version should be 8.
?? I specified:
-source 8
;-) Hence the confusion regarding the error.
David
> Rémi
>
> Sent from my Phone
>
> ----- Reply message -----
> From: "David Holmes" <david.holmes at oracle.com>
> To: "lambda-dev at openjdk.java.net" <lambda-dev at openjdk.java.net>
> Subject: Confusing javac error :)
> Date: Fri, Nov 30, 2012 05:09
>
>
> javac -J-showversion -source 8 TestLambda.java
> java version "1.8.0-ea"
> Java(TM) SE Runtime Environment (build 1.8.0-ea-b65)
> Java HotSpot(TM) Client VM (build 25.0-b09, mixed mode)
>
> TestLambda.java:13: error: lambda expressions are not supported in
> -source 1.8
> Runnable r = () -> System.out.println("Run") ;
> ^
> (use -source 8 or higher to enable lambda expressions)
> 1 error
>
> ----
>
> This is a mainline build of jdk8-b65 so this may already be fixed.
>
> David
>
More information about the lambda-dev
mailing list