Reputation: 43
I am new to maven and I am trying to compile a lambda expression.
When I run mvn install
I get this error:
lambda expressions are not supported in -source 1.5 (use -source 8 or higher to enable lambda expressions)
I am using SDK version 1.8 as can be seen in this image:
And the code that causes the compile error is this (the error accures on line 11):
Thanks in advance!
Upvotes: 0
Views: 133
Reputation: 35883
As stated in the comments, you need to set the source and target levels in you POM.
These can be smaller than the actual JDK you use.
Upvotes: 1