Confusing javac error :)
David Holmes
david.holmes at oracle.com
Thu Nov 29 20:09:57 PST 2012
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