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
Java 12 and IntelliJ IDEA.
From the main menu, select File | Project Structure | Project Settings | Modules. Select the module for which you want to add a library and click Dependencies. button and select Library. In the dialog that opens, select a project or a global library that you want to add to the module.
IntelliJ stores the JDK version used by the project within its Project Structure. There are two ways to locate this: Via menu navigation: Navigating to File -> Project Structure.
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.
The latest version of IntelliJ IDEA, 2017.1, does support jdk 9.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With