Cannot run JavaFX 11 with Eclipse

Ali  picture Ali · Mar 7, 2019 · Viewed 7.5k times · Source

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.)

Answer

Ali  picture Ali · Mar 7, 2019

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!