IDEA: java: invalid source release: 14

table of Contents

Problem Description

problem causes

Solution


Problem Description:

After writing code with IDEA and running, the following error is reported:

problem causes:

The reason for this problem is that the jdk in the project is inconsistent with the jdk version in the computer.

Solution:

1. Check the jdk version of the machine: command prompt input: java -version

2. Modify the jdk version of the Project project in IDEA

Step 1: Open the Project Structure project structure

Step 2: Modify the SDK version of Project

 

Step 3: Modify the Language Level of the Module module

 Step 4: Modify the Module SDK in the Module module

3. Find Java Complier, modify the byte code version to make the version consistent with the SDK version

 Summary: After the modification, compile and run again and there is no problem!

Guess you like

Origin blog.csdn.net/wtt15100/article/details/107935172