Does IntelliJ 2020.3 support early-access version of Java 16?

Answered

I obtained Java 16 early-access release from http://jdk.java.net/16/. 

I do not see any items for Java 16 in the various compiler or JDK version lists within IntelliJ 2020.3. 

Am I doing something wrong, or does 2020.3 not have preliminary support for early Java 16? I ask because IntelliJ often has support for early-access Java.

0
3 comments

It is detected and working as expected for me: https://i.imgur.com/GITDyjr.jpg

Can you tell me what is not working? 

0
Avatar
Permanently deleted user

Konstantin Annikov

Notice in your screen shot that `Project language level` is set to `X - Experimental` rather than to Java 16. Indeed, that pop-up menu offers a list of Java 1.3 through Java 15, but has no item for Java 16.  

Ditto for `Project Settings` > `Modules` > `Language level`  … no option for Java 16. 

I cannot get `java.time.*` to import.

When I do a Maven install, I get error:

>Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project Loom: Compilation failure
>Source option 6 is no longer supported. Use 7 or later.

I am currently trying to use the special build of Java 16 from Project Loom:

http://jdk.java.net/loom/

…but I had similar problems when trying Java 16 from:

https://jdk.java.net/16/

Obviously IntelliJ thinks I am working with Java 6 or earlier. I have no way to tell IntellIJ that my project uses Java 16 JDK and Java 16 features.

0

Java 16 support will be introduced in 2021.1. First EAP will be available in the next year. 

>  no option for Java 16. 

Java 16 language level has recently been added to 2021.1: https://youtrack.jetbrains.com/issue/IDEA-257409

> I cannot get `java.time.*` to import.

Check that JDK 16 is chosen for the project:

 

> Source option 6 is no longer supported. Use 7 or later.

Does Maven builds the project from command line? Seems Java 16 is not supported in Maven itself. 

0

Please sign in to leave a comment.