'Can't compile with jdk 11 in IntelliJ, cannot find symbol
Solution 1:[1]
Set compiler target bytecode version to 11:
SettingsBuild, Execution, DeploymentCompilerJava compiler- Set target bytecode version of your module to 11
Solution 2:[2]
You should check following things:
- You've JDK11 defined as one of the SDKs:

- Your project's default SDK is JDK11 and your projects default language level is 11:

- Your module language level is also 11.

And if you use Maven, check that your compiler plugin "source" and "target" properties in your pom.xml are 11. Your module language level configuration is imported from that pom.xml configuration in such a case
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
</properties>
or
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>11</source>
<target>11</target>
</configuration>
</plugin>
In case your pom.xml had wrong source or target level you may need to do Right-click | Maven | Reimport after changing that pom.xml. In case you use Gradle you should check that you have a similar configuration.
Tested with Maven 3.5.4 in IntelliJ IDEA 2018.2.4
Solution 3:[3]
You can use JDK 11 to compile but if you compile against an older version of java, it cannot find that method.
Go to File > Project Structure -> Project and check the project language level as shown by the arrow in the picture below:
Not working with project language level 10:

Working fine with project language level 11:

Note that I have the following Java Compiler settings (default settings for a fresh new project using IntelliJ 2018.3):
The project bytecode version is same as language level!

Solution 4:[4]
I had a similar problem. Got symbol not found for a Java 11 feature. Though everything was set to 11 already.
The solution was that in my Idea settings the Gradle JVM was set to JDK 8. (because I added JDK 11 later)
As sourceCompatibilty and targetCompatibility where not set in my build.gradle the gradle daemon (started from Idea) was running and compiling with JDK 8. These properties where dynamically set to 8 (or 1.8).
Telling Idea to set JVM for Gradle to 11 was my solution:
Solution 5:[5]
For my case, it was not even showing 11 in Project language level. So I had to choose X like below screenshot
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | |
| Solution 2 | |
| Solution 3 | |
| Solution 4 | |
| Solution 5 | Omar Faroque Anik |





