IntelliJ doesn't Understand java libraries on Java9-ea

混江龙づ霸主 提交于 2019-12-10 03:01:16

问题


I am using jdk9-ea 149 and created a sample javafx application

IntelliJ doesn't understand the java libraries, It's shows all the import statement in red color and they are all grayed out.even for java.util.List, java.util.ArrayList it has the same issue.

I am able to compile form outside but i am not able to compile the code from IntelliJ 2016.3.2 Ultimate Edition.

It looks like we need to add some libraries to IntelliJ project but with java9 build 149 jigsaw i don't know how to do that.

I am using Experimental features still it doesn't understand the import statements - see intellij setting below

IntelliJ Version : IntelliJ 2016.3.2 Ultimate Edition Java Version: java 9-ea build: 149


回答1:


As mentioned in IntelliJ IDEA 2016.3.1 is Out:

Speaking of JDK 9, IntelliJ IDEA 2016.3 won’t support builds 148 and up because they contain code that breaks things. Of course, we’re working to resolve this, and will support the latest JDK 9 builds in 2017.1 (its EAP may well start within the next few weeks).

In IntelliJ IDEA 2017.1: Java 9, Kotlin 1.1, Spring, Gradle, JavaScript, Go and more it says:

The latest builds of JDK 9 are fully supported, with assisted project import and coding assistance for editing module declarations.

So if you are using Java 9 build 148 or higher, you need to use version 2017.1 or higher.

Alternatively, if you need to use an older version of IntelliJ, downgrade to Java 9 build 147 or lower.




回答2:


The latest version of IntelliJ IDEA, 2017.1, does support jdk 9.



来源:https://stackoverflow.com/questions/41459969/intellij-doesnt-understand-java-libraries-on-java9-ea

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!