I would like to get an image from JAR library to my project.
<graphic>
<ImageView>
<Image url="@/toolbarButtonGraphics/general/TipOfTheDay24.gif"/>
</ImageView>
</graphic>
I've added the library to my module and it seemed to be correct but the compiler throws an error: Error occurred during initialization of boot layer java.lang.module.FindException: Unable to derive module descriptor for filepath.jar Caused by: java.lang.IllegalArgumentException: jlfgr.1.0: Invalid module name: '1' is not a Java identifier. Here's my module-info file:
requires javafx.fxml;
requires javafx.controls;
opens sample;
jlfgr.1.0.jar
? Why don't you add the jar to the module info? Have you tried renaming it tojlfgr-1.0.jar
? – Glans