#java.lang.module.FindException: Module javafx.controls not found

1 messages · Page 1 of 1 (latest)

brazen stratus
#

I'm getting this error while setting up JavaFX

mighty folioBOT
#

<@&987246399047479336> please have a look, thanks.

#

Here is an AI assisted attempt to answer your question 🤖. Maybe it helps! In any case, a human is on the way 👍. To continue talking to the AI, you can use </chatgpt:1108714622413963314>.

#

This error occurs when the JavaFX module is not found in the module path. To resolve this issue, you need to make sure that the JavaFX SDK is properly installed and added to your project's module path.

Here are some steps you can follow to set up JavaFX:

  1. Download the JavaFX SDK from the official website: https://gluonhq.com/products/javafx/

  2. Extract the downloaded file to a location on your computer.

  3. In your IDE (such as IntelliJ IDEA or Eclipse), go to project settings and add the JavaFX SDK as a library or module dependency.

  4. Make sure that you have added the necessary VM options to run JavaFX applications. For example, you can add the following VM options:
    --module-path /path/to/javafx-sdk-16/lib --add-modules javafx.controls,javafx.fxml

  5. Rebuild your project and run it again.

By following these steps, you should be able to set up JavaFX properly and resolve the "Module javafx.controls not found" error.

Roadmap Release GA Date Latest version Minimum JDK Long Term Support Extended or custom support Details 23 September 2024 early access 17 no 22 March 2024 early access 17 no 21 September 2023 21.0.2 (January 2024) 17 yes upon request details 20 March 2023 20.0.2 (July 2023) 17 no upon request details 19 September 2022 […]

brazen stratus
#

ModulePath contains JavaFX JDK and the classpath contains the library

spare basin
#

Including --add-modules javafx.controls,javafx.fxml ?

brazen stratus
#

yes im sure that should be working properly, here's the user libraries too btw

#

but give me a moment to re-do it

#

The right one is the tutorial im following for this, maybe the lack of a classpath to SDK is an issue?

brazen stratus
#

putting filepath in quotes didn't change anything either

spare basin
brazen stratus
#

fixed it by adding the JavaFX libraries to ModulePath
instead of Classpath

#

🫡