Cannot run JavaFX 11 with Eclipse

Ali :

I am trying to run a simple program using JavaFX 11 with Eclipse, but I am getting this error:

Error occurred during initialization of boot layer
java.lang.module.FindException: Module format not recognized: D:\javafx-sdk-11.0.2\lib\src.zip

I followed these instructions. This is where JDK & JavaFX are located:

D:\javafx-sdk-11.0.2\
C:\Program Files\Java\jdk-11.0.2

The VM arguments are:

--module-path "D:\javafx-sdk-11.0.2\lib" --add-modules=javafx.controls,javafx.fxml

Please help to identify and rectify the problem. (I tried several things as suggested below, but nothing seems to be working.)

Ali :

While making user library for JavaFX 11, I was adding all the files including .jar and the src.zip file.

However, now that I didn't select the src.zip file, it's working fine. :-)

This is the VM argument:

--module-path "F:\javafx-sdk-11.0.2\lib" --add-modules=javafx.controls,javafx.graphics,javafx.fxml

(Yup, on this PC, I used the F: drive.)

Thanks all for your support!

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=92995&siteId=1