CodexBloom - Programming Q&A Platform

Eclipse IDE 2023-09: how to to Resolve JavaFX Modules in Modular Application

👀 Views: 42 đŸ’Ŧ Answers: 1 📅 Created: 2025-06-01
eclipse javafx module Java

I tried several approaches but none seem to work. Quick question that's been bugging me - I tried several approaches but none seem to work. I'm working with an scenario in Eclipse IDE 2023-09 when trying to set up a modular JavaFX application. Despite correctly configuring the module path, Eclipse fails to recognize the JavaFX modules, leading to various unresolved types. I've ensured that the JavaFX SDK is properly installed and linked, but I'm still getting the following behavior message: ``` behavior: JavaFX runtime components are missing, and are required to run this application ``` I've added the JavaFX libraries in my project build path via: 1. Right-click on the project > Build Path > Configure Build Path. 2. Under the Libraries tab, I clicked on `Add Library` and selected the JavaFX SDK. My `module-info.java` looks like this: ```java module my.application { requires javafx.controls; requires javafx.fxml; exports my.application; } ``` I've also checked my run configuration to ensure it includes the VM arguments pointing to the JavaFX modules: ``` --module-path /path/to/javafx-sdk/lib --add-modules javafx.controls,javafx.fxml ``` I've tried cleaning and rebuilding the project multiple times, but it doesn't help. I also noticed that the project has a warning: `Module 'my.application' does not have a dependency on module 'javafx.controls'` although it is specified in the `module-info.java`. Here's the output from the Eclipse console: ``` Exception in Application start method java.lang.module.FindException: Module javafx.controls not found ``` What am I missing? Are there additional steps I should take to resolve this scenario in Eclipse? Any insights would be appreciated! Any ideas what could be causing this? Any help would be greatly appreciated! Am I approaching this the right way? This issue appeared after updating to Java 3.10. Any help would be greatly appreciated!