Java Warning:Build path specifies execution environment J2SE-1.5.

Java 问题描述:

"Warning(1 item)

Build path specifies execution environment J2SE-1.5. There are no JREs installed in the workspace that are strictly compatible with this environment."

在网上查了一些答案,最终在一个英文网站 找到一个合适的解决方案,总结如下,以备其他人使用  

打开项目下拉菜单 --> pom.xml --> Overview --> Properties --> Create... --> Add property (Name: "maven.compiler.target" Value: "1.8") --> Create... --> Add property (Name: "maven.compiler.source" Value: "1.8") --> 'Ctrl+S'键保存

右键项目 --> Maven --> Update Project...

备注:"1.8"为Java JDK 版本 ,可通过 Window --> Preferences --> Java --> Compiler --> Compiler Compliance Settings 查看.




你可能感兴趣的:(Java Warning:Build path specifies execution environment J2SE-1.5.)