1、检测 环境变量配置
win+r => cmd
检测jdk版本 java -version
查看环境变量中jdk路径 echo %JAVA_HOME%
2、打开IDEA的设置或首选项对话框
File → Settings→ Build, Execution, Deployment” → “Compiler”,在“Java Compiler”部分,将“Target bytecode version”设置为1.8
File → Settings→ Build, Execution, Deployment” →“Build Tools” → Maven → Runner → JRE
File → Project Structure → “Modules” → “Languages level”,选择或设置为8-Lambdas, type annotations
File → Project Structure → 点击“SDKs”按钮,然后点击“+”按钮,选择“Add JDK”,导航到JDK 1.8的安装路径,并添加它到项目中
标签:21,jdk,1.8,JDK,报错,Build,File From: https://www.cnblogs.com/wangdch/p/18142934