JavaFX Modules are not visible for VM

Embid123 :

I was using Intellij Idea as my IDE. Since I needed to use css files, I've installed Intellij Ultimate. Now javaFx is not working on both of them.

Thrown exception:

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

The VM settings are exacly the same, as in the previous IDE. Suprisingly- if I put only one jar in --add-modules="", the missing jar, shown in the console, is the one present in the instruction above. E.g:

--module-path="C:\\javafx-sdk-11.0.1\\lib" --add-modules=javafx.controls for the console output shown earlier.

--module-path="C:\\javafx-sdk-11.0.1\\lib" --add-modules=javafx.swing for

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

The path to lib folder of javafx is valid. I don't have any idea why is it not working.

Embid123 :

I've found an answer to it. I installed Ultimate 2018.3 version, which requires a path variable. I added a path variable in options and replaced (in VM options) the path with the path variable. And now it works. Setting path variable

Current VM options input looke like:

--module-path ${PATH_TO_FX} --add-modules=javafx.controls,javafx.fxml,javafx.base,javafx.media,javafx.graphics,javafx.swing,javafx.web

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=83894&siteId=1