System.out.println("two");default ->System.out.println("many");}} The IDE throws the error that reads Error:java: error: invalid source release: 13Relevant error and project configuration screens :About IDE:IntelliJ IDEA 2018.3.3 (Community Edition)Build #IC-183.5153.38, built on January 9, 2019JRE: 1.8.0_152-release-1343-b26 x86_64JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.omacOS 10.13.6Tried switching back the language level to 12, without experimental features, but it..." />

Error:java: error: invalid source release: 13

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 Scanner(System.in);

int value = scanner.nextInt();

// After JEP-325

switch (value) {

case 1 ->System.out.println("one");

case 2 ->System.out.println("two");

default ->System.out.println("many");

}

}

The IDE throws the error that reads

Error:java: error: invalid source release: 13

Relevant error and project configuration screens :

About IDE:

IntelliJ IDEA 2018.3.3 (Community Edition)

Build #IC-183.5153.38, built on January 9, 2019

JRE: 1.8.0_152-release-1343-b26 x86_64

JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o

macOS 10.13.6

Tried switching back the language level to 12, without experimental features, but it...

Read More »

By: StackOverFlow - 6 days ago

Related Posts