2021年4月5日星期一

Error occurred during initialization of boot layer java.lang.module.FindException: Module javafx.controls not found When working with JavaFX in vscode

I'm trying to use vscode to work in JavaFX (I'm on macOS if it makes any difference), and no matter what when I try to run my code it gives me this error:

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

This only happens when I have these vmArgs in the launch.json file:

"vmArgs": "--module-path /javafx/lib/src/javafx.controls --add-modules javafx.controls"  

If I don't have those vmArgs in the json, I get this error instead:

Error: JavaFX runtime components are missing, and are required to run this application.  

What should I do to get this to run? Why is it not recognizing that I have referenced the javafx.controls module in my json but yet when I don't have it, I get another error? Any help would be appreciated because I really have no clue which direction to take here.

https://stackoverflow.com/questions/66961474/error-occurred-during-initialization-of-boot-layer-java-lang-module-findexceptio April 06, 2021 at 08:59AM

没有评论:

发表评论