1
Java Maven project in Eclipse neon (4.6.0), simply does not compile when using lambda.
The mistake:
use lambda Expressions are not supported in -source 1.5 (use -source 8 or Higher to enable lambda Expressions)
The detail is I’m using JDK 8:
java version "1.8.0_101" Java(TM) SE Runtime Environment (build 1.8.0_101-B13) Java Hotspot(TM) 64-Bit Server VM (build 25.101-B13, Mixed mode)
Eclipse is also configured correctly according to the images below:
It worked, but I’d never had to do it, you know why? Thank you.
– user54976
Yes, every time you build the Maven project it changes the version of the java you selected. That’s why you always need to report this in the pom.
– Giuliana Bezerra