java fx 11 and jdk 11
Answered
No matter what i do (with regard to following web forum advice) i cant get the 2 above items to play at all(jdk11 javafx11)
i get Error: Could not find or load main class C:\Users\slmhe\Documents\openjfx-11.0.2_windows-x64_bin-sdk\javafx-sdk-11.0.2\lib
Caused by: java.lang.ClassNotFoundException: C:\Users\slmhe\Documents\openjfx-11.0.2_windows-x64_bin-sdk\javafx-sdk-11.0.2\lib
This is stressing me out, have you any ideas how to over come this. Btw non of the import java lines are red. If i use jdk 8 it still wont have it /
many thanks,
stevehepple
Please sign in to leave a comment.
Hello,
What IDE version do you use? Is it possible to share your project for investigation?
Version of intellij is:
Jdk-11.0.2 windows-x64(and the open jdk 11 as well )
javafx 11.0.2
I hava tried setting up project structure like this web site suggests... https://stackoverflow.com/questions/52467561/intellij-cant-recognize-javafx-11-with-openjdk-11/52470141#52470141 but still get errors about sdk not being set up.....
I have now got java 8 doing javafx(because it comes built in) .
Any ides please ?
Any chance that you missed adding the javafx module path to the run configuration you are using? In my run configuration I have the VM options configured as:
--module-path C:/LocalApps/javafx-sdk-11/lib --add-modules=javafx.controls,javafx.fxml,javafx.graphics
and I'm running fine. You may need more modules than I'm using.
It also seems strange that the error message is reporting the path to JavaFX as the "class" not found.
No i added that one, including putting the c:etc/ in quote marks either end......
I created a new JavaFX project in Intellj IDEA and configured it for JDK 11.0.2 and JavaFX 11.0.2. I pushed it to github at
https://github.com/kenolson/SampleFX
Take a look at that and see if it helps you figure out why your project doesn't run. (You'll need to update paths of course.)
Sorry and thanks for your effort...but i have no idea what any of that is or means....i am a little bit passed hello world status with coding, and not quite rule the world with coding lol.
I have got javafx to work by using this video: https://www.youtube.com/watch?v=qn2tbftFjno&t=2s Which involves creating a module.info file into the src folder....but i dont know if thats what everyone else does....?
Again, many thanks