Reputation: 57
C:\Users\SAYAN\Desktop\block-ch\project\khs-blockchain-java-example-master\src\main\java\simple\chain\Block.java:[51,29] error: lambda expressions are not supported in -source 1.5
I have installed jdk 1.8. Still I am getting this error. Need help!!!
Upvotes: 0
Views: 61
Reputation: 989
Or use below in your pom.xml
<java.version>1.8</java.version>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
Upvotes: 0
Reputation: 57
I made it. This will work.
In the pom.xml we need to add
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.2</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
Upvotes: 1