0

Following instructions at https://openjfx.io/openjfx-docs/#install-javafx https://openjfx.io/openjfx-docs/#install-javafx, I compiled the sample HelloFX.java via:

javac --module-path $PATH_TO_FX --add-modules=javafx.controls HelloFX.java 

I got error:

error: module not found: javafx.controls
1 error

then I add the line as instructs: javac --module-path $PATH_TO_FX --add modules=javafx.controls.javafx.fxml HelloFX.java

and got error:

error: module not found: javafx.fxml
error: module not found: javafx.controls
2 errors

then I add the last line in the instructions: java --module-path $PATH_TO_FX --add-modules=javafx.controls HelloFX

and got error:

Error occurred during initialization of boot layer
java.lang.module.FindException: Module javafx.controls not found

Please help!

Chau Le
  • 1
  • 1

1 Answers1

0

I had to also include the 'lib' directory: --module-path %PATH_TO_FX%;%PATH_TO_FX%\lib to make it compile. (Windows 10)

Arilou
  • 99
  • 1
  • 5