Someone Please help! [message #1826414] |
Fri, 24 April 2020 10:47  |
Eclipse User |
|
|
|
In the last number of weeks I have been learning Java, or at least trying to. The problem is the course had major compatibility issues with getting 'Windows Builder' ,'JavaFX', and 'SceneBuilder' work work harmoniously with Eclipse.
After numerous attempts, my system suffered a failure and it was reset. Now I have been re-installing the software only this time I'm not trying to find 'version X' from 'Y months or years ago', I am using the latest releases. So to date I have installed:
Eclipse 2020-3
JDK-14.0.1
javafx-sdk-11.0.2
jre1.8.0_251
within Eclipse, I installed from Eclipse Marketplace:
e(fx)clipse 3.6.0
I added the path for the above JDK, javafx and jre bins to the variable and system paths under 'environment variables. I am running Windows 10 pro.
I have watched so many instruction videos I think I can almost quote them. I set up the build paths within Eclipse in accordance to direction. However, when I attempt to run a practice file identical to the ones shown in the 'how-to' videos I get:
Error: Could not find or load main class javafx.controls,javafx.fxml
Caused by: java.lang.ClassNotFoundException: javafx.controls,javafx.fxml
From the command prompt: java -version replies
java version "1.8.0_251"
Java(TM) SE Runtime Environment (build 1.8.0_251-b08)
Java HotSpot(TM) Client VM (build 25.251-b08, mixed mode)
Also from the command prompt: javac -version replies
java version 14.0.1
Please help! Where did I go wrong?
|
|
|
Re: Someone Please help! [message #1826449 is a reply to message #1826414] |
Fri, 24 April 2020 22:21  |
Eclipse User |
|
|
|
Okay! So I continued to try different things, hoping I missed something. I went into 'Run Configuration'. I then selected the 'Arguments' tab and then clicked into 'VM arguments'. I delete my entry that was there from earlier and re-entered it.
I entered:
--module-path "C:\Program Files\Java\javafx-sdk-11.0.2\lib" --add-modules javafx.controls,javafx.fxml
I no longer get the error. What baffles me is that it is the exact same script I had there! In any event, it appears to work as advertised at the moment. Now to see if Windows Builder and or Scene Builder will co-operate!
|
|
|
Powered by
FUDForum. Page generated in 0.07884 seconds