Top "Java-12" questions

Use this tag for questions specific to Java 12, which is version 12 of the Java platform, released on 19 March 2019.

Error:java: error: invalid source release: 13 using JDK12 with IntelliJ

I am trying to build a project with JDK-12 ea. While trying to execute a sample class: public static void …

java intellij-idea java-12 preview-feature
The package org.w3c.dom is accessible from more than one module: <unnamed>, java.xml

I am unable to import org.w3c.dom.NodeList package to Eclipse. It is showing The package org.w3…

java eclipse dom w3c java-12
Compile and execute a JDK preview feature with Maven

With JDK/12 EarlyAccess Build 10, the JEP-325 Switch Expressions has been integrated as a preview feature in the JDK. A sample …

java maven switch-statement java-12 preview-feature
Eclipse 2019-03 is showing this message: JRE Oracle Corporation/12.0.1 is not supported, advanced source lookup disabled

I am using Eclipse 2019-03 (current version as of now) and JDK 12 on Windows 10. Whenever I run any code, it …

java eclipse java-12
Get declared fields of java.lang.reflect.Fields in jdk12

In java8 it was possible to access fields of class java.lang.reflect.Fields using e.g. Field.class.getDeclaredFields(); …

java unit-testing reflection java-12
How to enable Java 12 preview features with Gradle?

When I tried to build my Java code which has switch expressions using Gradle, it throws this error: error: switch …

java gradle groovy build.gradle java-12