gpt4 book ai didi

java - IntelliJ 不理解 Java9-ea 上的 Java 库

转载 作者:塔克拉玛干 更新时间:2023-11-03 03:48:07 26 4
gpt4 key购买 nike

我正在使用 jdk9-ea 149 并创建了一个示例 javafx 应用程序

IntelliJ 不理解 java 库,它以红色显示所有导入语句并且它们都是灰色。即使对于 java.util .List, java.util.ArrayList 也有同样的问题

我可以在外部编译表单,但无法从 IntelliJ 2016.3.2 Ultimate Edition 编译代码。

看起来我们需要向 IntelliJ 项目添加一些库,但是使用 java9 build 149 jigsaw 我不知道该怎么做。

Sample JavaFx Code On Intellij using jdk9-ea

我正在使用实验性功能,它仍然不理解导入语句 - 请参阅下面的 intellij 设置

IntelliJ 版本:IntelliJ 2016.3.2 终极版Java 版本:java 9-ea 构建:149 enter image description here

最佳答案

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).

IntelliJ IDEA 2017.1: Java 9, Kotlin 1.1, Spring, Gradle, JavaScript, Go and more它说:

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

因此,如果您使用的是 Java 9 build 148 或更高版本,则需要使用 2017.1 或更高版本。

或者,如果您需要使用旧版本的 IntelliJ,请降级到 Java 9 build 147 或更低版本。

关于java - IntelliJ 不理解 Java9-ea 上的 Java 库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41459969/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com