2

I've added jar file to my project. added it to the module setting as well. and I getting this error :

Error occurred during initialization of boot layer
java.lang.module.FindException: Module jlfgr not found, required by UdemyFX

this is the sample.fxml :

<GridPane fx:controller="sample.Controller"
      xmlns:fx="http://javafx.com/fxml" alignment="CENTER" hgap="10" vgap="10">
<Button text="Click me!">
    <graphic>
        <ImageView>
            <Image url="@/toolbarButtonGraphics/general/TipOfTheDay24.gif"/>
        </ImageView>
    </graphic>
</Button>

and this is the module-info :

module UdemyFX {

    requires javafx.fxml;
    requires javafx.graphics;
    requires javafx.controls;
    requires jlfgr;

    opens sample;
}

I am using java 11, I have no idea why I keep getting that error.. ty!

1
  • Please also include the java command you used to run the application. Commented Apr 28, 2021 at 14:08

1 Answer 1

4

The jar-File for module jlfgr is not in the module-path.

If you already have a module-path defined in your java call, then add the jar to this directory.

If you don't have the parameter --module-path or -p in your call, then add the path to the jlfgr module.

Example:

java --module-path . --module YourModule/path.to.your.MainClass
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.