In the Moduls section I switch the language level to 7.0, but 1.5 is still used when compiling.

What could be the problem?

  • Ctrl + Alt + Shift + S in the Project section, see what version of the SDK is for all modules of the project. - Vladimir Glinskikh
  • Well, that seems to be worth it, but it still doesn’t work - Pavel

1 answer 1

If the project uses maven, then it also needs to change something like this:

<properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.target>1.8</maven.compiler.target> </properties> 
  • Your advice did not help :( - Pavel
  • @Pavel and what version of Idea? Is there an example of a project to check with yourself? - Pavlo Vasylchenko