I am trying to build a project with JDK-12 ea. While trying to execute a sample class:
public static void main(String[] args) {
Scanner scanner = new Sc
Just for the record. I was having similar error but with Java 14:
Error:java: error: invalid source release: 14
What solved the problem for me was to hunt down on every single place of the IDE where there was another Java version being mentioned that wasn't the 14th one.
The places that I had to change were:
File -> Project Structure -> Project Settings
File -> Project Structure -> Module Settings -> Tab: Sources: Language Level.
File -> Project Structure -> Module Settings -> Tab: Dependencies: Module SDK.
File -> Settings -> Compiler -> Java Compiler -> Target bytecode version.