idea jdk明明是1.8了,还是 出现Diamond types are not supported at this language level

 

2018年08月13日 20:33:54 坑里水库 阅读数:570

转载自 :https://blog.****.net/amoscn/article/details/79718400

三个地方

  • project structure中的project ,SDK选择1.8,Project language level选择8
  • project structure中的module,选择Language level为8
  • setting中的java compiler

idea jdk明明是1.8了,还是 出现Diamond types are not supported at this language level

idea jdk明明是1.8了,还是 出现Diamond types are not supported at this language level

idea jdk明明是1.8了,还是 出现Diamond types are not supported at this language level

maven配置

 
  1. <!--控制项目的language level和compile 版本-->

  2. <plugin>

  3. <groupId>org.apache.maven.plugins</groupId>

  4. <artifactId>maven-compiler-plugin</artifactId>

  5. <version>2.3.2</version>

  6. <configuration>

  7. <source>1.8</source>

  8. <target>1.8</target>

  9. </configuration>

  10. </plugin>