close

[Solved] error: module not found: javafx.controls

Hello Guys, How are you all? Hope You all Are Fine. Today I am trying to use JavaFX SDK and Tried to compile it. But I am facing following error: module not found: javafx.controls in Java. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How error: module not found: javafx.controls Error Occurs?

I am trying to use JavaFX SDK and Tried to compile it. But I am facing following error.

error: module not found: javafx.controls

How To Solve error: module not found: javafx.controls Error?

  1. How To Solve error: module not found: javafx.controls Error ?

    To Solve error: module not found: javafx.controls Error You just need to add PATH_TO_FX. First of all Use %PATH_TO_FX% instead of $PATH_TO_FX in the command line. Then Recreate the variables for both system and user PATH_TO_FX enclosing its value in quotation marks. And then restart your PC to reflect new environment variable. Now, your error must be solved.

  2. error: module not found: javafx.controls

    To Solve error: module not found: javafx.controls Error You just need to add PATH_TO_FX. First of all Use %PATH_TO_FX% instead of $PATH_TO_FX in the command line. Then Recreate the variables for both system and user PATH_TO_FX enclosing its value in quotation marks. And then restart your PC to reflect new environment variable. Now, your error must be solved.

Solution 1: javafx.controls module is not loaded by default

Problem is The javafx.controls module is not loaded by default. You can force it into the boot layer by running with --add-modules javafx.controls.

Solution 2: add PATH_TO_FX 

You just need to add PATH_TO_FX. First of all Use %PATH_TO_FX% instead of $PATH_TO_FX in the command line. Then Recreate the variables for both system and user PATH_TO_FX enclosing its value in quotation marks. And then restart your PC to reflect new environment variable. Now, your error must be solved.

Summary

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?

Also, Read

Please Rate Our Solution to Motivate Us For Give Our Best

Leave a Comment