Reputation: 33
I've been going through Stackoverflow answers for a while now, but none works. Basically I want to run JavaFX in intellij and created the basic JavaFX project. I'm using JDK/JavaFX 13.0.1. I added it under libraries as well. The path is C:\Program Files\Java\jdk-13.0.1\bin\java.exe
But when I try to set the VM-options, I get
Error: Could not find or load main class Files\\Java\\javafx-sdk-13.0.1\\lib
Caused by: java.lang.ClassNotFoundException: Files\\Java\\javafx-sdk-13.0.1\\lib
In the VM options I have --module-path %path% --add-modules javafx.controls,javafx.fxml
for %path%, I have tried everything I've seen on stackoverflow:
C:\\Program Files\\Java\\javafx-sdk-13.0.1\\lib
\C:\\Program Files\\Java\\javafx-sdk-13.0.1\\lib\
\C:\Program Files\Java\javafx-sdk-13.0.1\lib\
C:\Program Files\Java\javafx-sdk-13.0.1\lib
same with / instead of \.
What the hell is going on, can someone please help me get it running?
Upvotes: 3
Views: 9540
Reputation: 402335
If the path you are referencing in the VM Options contains spaces, it should be surrounded by the double quotes ("
):
-module-path "C:\Program Files\Java\javafx-sdk-13.0.1\lib"
Upvotes: 6