1

Since the pandemic started. I chose to learn java and this is the first time i'm having an error i can't rectify for more than three(3) days now. this is the code

<GridPane fx:controller="sample.Controller"
          xmlns:fx="http://javafx.com/fxml" alignment="center" hgap="10" vgap="10">
    <Button GridPane.rowIndex="0" GridPane.columnIndex="0" text="Refresh">
        <graphic>
            <ImageView>
                <Image url="@/toolbarButtonGraphics/general/About16.gif"/>
            </ImageView>
        </graphic>
    </Button>
</GridPane>

I keep getting this error below

"Error occurred during initialization of boot layer java.lang.module.FindException: Unable to derive module descriptor for C:\Users\Alt\Documents\jlfgr-1_0.jar Caused by: java.lang.IllegalArgumentException: jlfgr.1.0: Invalid module name: '1' is not a Java identifier"

after i have added the jlfgr.1.0 file in the the projects. please i need somebody's help. Thank you very much. I really appreciate.

stdunbar
  • 16,263
  • 11
  • 31
  • 53
alt
  • 51
  • 1
  • 6
  • Hi, please provide the code that is producing the error. – fose Jul 06 '20 at 22:39
  • Please [edit](https://stackoverflow.com/posts/62765500/edit) the post instead of posting the information in the comments. It's much easier to read. – stdunbar Jul 06 '20 at 22:57
  • @stdunbar i just edited the post with the code. This is the first time i'm actually using stackoverflow and i should be getting used to it soon. Thanks – alt Jul 06 '20 at 23:05
  • @fose i just edited the post with the code. This is the first time i'm actually using stackoverflow and i should be getting used to it soon. Thanks you. I appreciate if i could get help – alt Jul 06 '20 at 23:06

1 Answers1

1

If you can locate the module-info.java file, try to:

  1. Rename the jar file to something like just jlfgr.jar

  2. In the module-info.java file, add the following sentence:

    requires jlfgr;
    

Hope it's helpful.

aran
  • 10,978
  • 5
  • 39
  • 69