Can't compile with jdk 11 in IntelliJ, cannot find symbol

starsuper picture starsuper · Sep 26, 2018 · Viewed 15.2k times · Source

I set the JDK 11, it compiles until I use the new method of Java 11 isBlank() of a String when I use that method this error appears when compiling, I tried cleaning the JDK installations, cleaning caches from IntelliJ, rebuilding but nothing helps. The error is:

enter image description here

Answer

Denis Zavedeev picture Denis Zavedeev · Sep 26, 2018

Try setting compiler target bytecode version to 11.

Go to Settings - Build, Execution, Deployment - Compiler - Java compiler and set target bytecode version of your module to 11