Error:java: javacTask: source release 8 requires target release 1.8

2021-6-3 anglehua

Using IntelliJ IDE can't compile any projects. Screenshots of settings below:

Used JDK:

Project SDK and Language level:

Language Level:

Anybody have any ideas?

  1. File > Settings > Build, Execution, Deployment > Compiler > Java Compiler
  2. Change Target bytecode version to 1.8 of the module that you are working for.

If you are using Maven

Add the compiler plugin to pom.xml under the top-level project node:


(Hoisted from the comments.)

Note: If you don't mind reimporting your project, then the only thing you really need to do is change the pom and reimport the project, then IntelliJ will pick up the correct settings and you don't have to manually change them.

You need to go to Settings and set under the Java compiler the following: enter image description here

also check the Project Settings


Powered by emlog 京ICP备15036472号-3 sitemap