References to interface static methods are allowed only at source level 1.8 or above

If you're working on a maven project and you're not able to change the JRE Library in Eclipse, then you can add the following dependency to the pom.xml

<properties>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
</properties>

You have JDK 7 installed instead of JDK 8. The Stream API appeared only in Java 8. You can download Java 8(JDK 8 or OpenJDK) from the official site and install it as a JDK in your project.


Click on the Add Library button. It brings your screen to point to the Java location.

Select Directory, button right besides JRE home and point to the installed folder location.