OpenJFX11 and JDK 11

Answered

Hello,

I have a multi-module Maven  project and I thought this is what I need to use OpenJFX. The requires clause is not working.

What else does the IDE need ?

Thanks,

Mohan


<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>11.0.1</version>
</dependency>

module layout {
requires decorator;
requires javafx.controls;
}
7 comments
Comment actions Permalink

I added OpenJFX as dependency and added to this to the Application template. Now this JDK 11 project compiles successfully.

But the IDE still shows requires javafx-controls in red. I haven't still added any JavaFX code..

  1. It is a Maven multi-module project and the parent POM has the dependency. 
  2. It is a plain Jdk11 project. I am going to add JavaFX code to it.
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>11.0.1</version>
</dependency>
--module-path="C:\Machine Learning\Stat110\openjfx-11.0.1_windows-x64_bin-jmods\javafx-jmods-11.0.1" --add-modules=javafx.controls

0
Comment actions Permalink

What exact error do you see? Can you build the project from command line by Maven? Can you build the project from IDE (Build | Rebuild Project)?

Please provide a sample project to check if possible.

0
Comment actions Permalink

 IDE still shows requires javafx-controls in red. The tooltip indicates that that module is not found

  1. Builds using Maven
  2. Build from IDE using Maven.

I can provide an exported .zip file. Where should I upload ?

  1. Added a dependency pointing to the OpenJFX folder shown below. This is for the module 'layout'.
  2. I have added this to 'Application' template VM options.
--module-path="C:\Machine Learning\Stat110\openjfx-11.0.1_windows-x64_bin-jmods\javafx-jmods-11.0.1" --add-modules=javafx.controls
0
Comment actions Permalink

You can upload it here: https://intellij-support.jetbrains.com/hc/articles/206869619.

What IDE version do you use? Does it happen in 2018.3 release?

0
Comment actions Permalink

In this case I had to specify the dependency on the OpenJFX Jar files. Earlier I depended on the 'jmods'.

0

Please sign in to leave a comment.