Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/384.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
JAVA正在向项目添加jar文件,未找到模块_Java - Fatal编程技术网

JAVA正在向项目添加jar文件,未找到模块

JAVA正在向项目添加jar文件,未找到模块,java,Java,我已经将jar文件添加到我的项目中。 也将其添加到模块设置中。 我得到了这个错误: Error occurred during initialization of boot layer java.lang.module.FindException: Module jlfgr not found, required by UdemyFX 这是sample.fxml: <GridPane fx:controller="sample.Controller" xm

我已经将jar文件添加到我的项目中。 也将其添加到模块设置中。 我得到了这个错误:

Error occurred during initialization of boot layer
java.lang.module.FindException: Module jlfgr not found, required by UdemyFX
这是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>

我使用的是java 11,我不知道为什么会不断出现这种错误。。泰

模块的jar文件
jlfgr
不在模块路径中

如果已经在java调用中定义了模块路径,那么将jar添加到此目录

如果调用中没有参数
--module path
-p
,请将路径添加到
jlfgr
模块

例如:

java --module-path . --module YourModule/path.to.your.MainClass

还请包括用于运行应用程序的java命令。
java --module-path . --module YourModule/path.to.your.MainClass