I'm setting up a Maven project based on Java/JavaFX 11 which should be both editable in IntelliJ and Visual Studio Code.
My JDK is 11.0.3 (Windows x64) from https://adoptopenjdk.net/.
The pom.xml has a dependency for
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>11.0.2</version>
</dependency>
My app can be compiled and run with "compiler:compile" and "exec:java" in IntelliJ. So step one succeeded.
Now when opening the same project in Visual Studio compiling and running does not succeed with a lot of similar error message
The package javafx.scene.chart is accessible from more than one module: <unnamed>, javafx.controls
I added a settings.json file in .vscode to point to the correct JDK directory.
{
"java.dependency.packagePresentation": "hierarchical",
"java.home": "C:/Program Files/Java/jdk-11.0.3+7",
"java.configuration.updateBuildConfiguration": "automatic"
}
But it still seems VSC has issues with two JavaFX versions, or isn't using the correct JDK. In the "Java Dependencies" view I can see references from both "JRE System Library" and "Maven" to JavaFX. Is there a way I can exclude them from the JRE view?
Screenshots as how JavaFX references are shown in VSC:


jdk-11.0.3+7/jmodsfolder doesn't have the JavaFX jmods?