JDK、OpenJDK、javafx

JDK 8中有javafx,OpenJDK中没有javafx

JDK从11开始也没有javafx,需要手动引入openjfx

要在OpenJDK中使用javafx,总是需要手动引入openjfx,并且OpenJDK的版本要跟openjfx的版本一致

Maven引入openjfx 16(适用于OpenJDK 16):

<dependency>
    <groupId>org.openjfx</groupId>
    <artifactId>javafx-base</artifactId>
    <version>16-ea+4</version>
</dependency>

参考文献:

https://search.maven.org/artifact/org.openjfx/javafx

Share

You may also like...

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注