[Solved] IntelliJ idea error: error: Java does not support release 5

Method 1

1. Confirm to configure Maven

Find the path in Maven home path and find the Maven address \ conf \ setting xml

Select your own JDK version

<profile>
      <id>development</id>
      <activation>
        <jdk>1.8</jdk>
        <activeByDefault>true</activeByDefault>
      </activation>
      <properties>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
      </properties>
    </profile>

Restart idea

Method 2

In project POM Specify the JDK version in the XML file

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>11</maven.compiler.source>
    <maven.compiler.target>11</maven.compiler.target>
</properties>

Read More: