Error running project on idea “The diamond operator is not supported in – source 1.5”, because lambda expressions, a new feature in Java 8, have been used in the project. Of course, the syntax of 1.5 is not supported.
1. Ensure that the bytecode compilation version in Java compiler in setting in idea is 8
2. Modify the language level of the module in the project structure to 8.
3. Check the pom.xml file of Maven project to see if the following attributes are added.
<properties> <maven.compiler.source>8</maven.compiler.source> <maven.compiler.target>8</maven.compiler.target> </properties>
- [Solved] IDEA Warning: Information:javac 1.8.0_251 was used to compile java sources
- [idea]Error:java: invalid source release: 1.8
- How to Solve IDEA maven Error:Perhaps you are running on a JRE rather than a JDK
- Automatic version change of IntelliJ idea language level and Java compiler
- Usage of API documented as @since 1.8+
- [Solved] maven 3.5.0 combined with eclipse suggests solutions to lambda expressions are allowed only at source level 1.8 or above errors
- Maven [error] no longer supports source option 5. Please use version 7 or later
- [Solved] IDEA JDK is 1.8 Warning: Diamond types are not supported at this language level
- [Solved] IDEA Compile Error: java: Compilation failed: internal java compiler error
- Error:java: javacTask: source release 8 requires target release 1.8