I can't find the config to set Java language level.
Asked
Active
Viewed 484 times
2 Answers
0
You might find the answer here How to change project language level for all project in Intellij
Change the sourceCompality
to 1.8
, if it didn't work, also change the Project structure JDK.

Tịnh Trần Thanh
- 7
- 3
-
could not find the config – shqu alun Oct 27 '22 at 01:47
0
If you are using Maven, in pom.xml
file use:
<properties>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.source>11</maven.compiler.source>
</properties>
If you are using Gradle, in build.gradle
file use:
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}

Andrey
- 15,144
- 25
- 91
- 187
-
-
Do you use Maven or Gradle? What exactly have you set and in which file(s)? How many modules do you have? – Andrey Apr 24 '23 at 15:32