I have a downloaded OpenJDK 11.0.11_9 JRE and a corresponding version of OpenJFX (11.0.2). I have configured eclipse to use the downloaded JDK11 for compilation and running my project. (For various reasons I am not using the system's default JDK.)
In the project properties -> Java Build Path -> Libraries tab, I added the various javafx .jar files in the "Modulepath" section. The Module Dependencies tab shows them listed on the left side.
But when I run the project I get a NoClassDefFound error for the first javafx class it tries to load.
If I manually put "--add-modules javafx.controls,javafx.swing,javafx.media" in the VM arguments in the Run Configuration, it works, but this seems to defeat the whole point of configuring the Modules Dependencies in the build path in the first place.
What's the proper way to do this?