Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
313 views
in Technique[技术] by (71.8m points)

java - I can't run JavaFX window despite that I add libraries and add PATH to VM options

I would like to run JavaFX. I already ran it, but I used same scenery so I don't know why it isn't running now. At first I add libraries to cart Libraries in Module settings, next I wrote path to VM options in Run/Debug configuration:

--module-path C:Program Filesopenjfx-15.0.1_windows-x64_bin-sdkjavafx-sdk-15.0.1lib --add-modules javafx.controls,javafx.fxml

However, now I see:

Error: Could not find or load main class Filesopenjfx-15.0.1_windows-x64_bin-sdkjavafx-sdk-15.0.1lib
Caused by: java.lang.ClassNotFoundException: Filesopenjfx-15.0.1_windows-x64_bin-sdkjavafx-sdk-15.0.1lib

I ran it using the same method in the past so I don't know why there is error now.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I solve it now :-)
I forgot to write the path in quotation marks. So this is right:
--module-path "C:Program Filesopenjfx-15.0.1_windows-x64_bin-sdkjavafx-sdk-15.0.1lib" --add-modules javafx.controls,javafx.fxml


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...