得到“找不到模块javafx.controls".错误的Java Eclipse IDE [英] Getting "Module javafx.controls not found" error Java Eclipse IDE

查看:546
本文介绍了得到“找不到模块javafx.controls".错误的Java Eclipse IDE的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将Eclipse IDE 2020-03版本与Java结合使用.我正在尝试使用FXML,在线检查了一些教程和步骤,并按照它们进行操作.但是我仍然收到以下错误:

I am using Eclipse IDE 2020-03 version with Java. I am trying to use FXML, checked some tutorials and steps online and followed them. But I am still getting the following error:

启动层初始化期间发生错误java.lang.module.FindException:找不到模块javafx.controls

Error occurred during initialization of boot layer java.lang.module.FindException: Module javafx.controls not found

我在Google上寻求帮助.有很多人有相同的问题,并且能够解决此问题.但是我所看到的只是他们正在使用NetBeans IDE或IntelliJ.有人有针对Eclipse的解决方案吗?任何帮助将不胜感激.

I googled for help. There are a lot of people having the same issue and were able to resolve this issue. But all I've seen is they are using either NetBeans IDE or IntelliJ. Does anybody have solution for Eclipse? Any help would be appreciated.

我遵循了本教程-> https://www.youtube.com/watch?v=bC4XB6JAaoU .这是我目前拥有的:

I followed this tutorial -> https://www.youtube.com/watch?v=bC4XB6JAaoU . Here is what I currently have:

从Market Place安装的e(fx)clipse 3.6.0

"Java构建路径";包含库(我当时是15.0,然后切换回14.0,但错误仍然存​​在)

"Java Build Path" contains libraries (I was on 15.0, then switched back to 14.0 but the error still exist)

javafs-sdk jar文件

"Java构建路径";包含库(我当时是15.0,然后切换回14.0,但错误仍然存​​在)

"Java Build Path" contains libraries (I was on 15.0, then switched back to 14.0 but the error still exist)

VM参数具有以下行(指向库位置):--module-path"C:\ Users \ my_name \ Documents \ Scene Builder \ openjfx-14.0.1_windows-x64_bin-sdk \ javafx-sdk-14.0.1 \ lib"--add-modules javafx.controls,javafx.fxml

VM Arguments has the following line (pointing library location): --module-path "C:\Users\my_name\Documents\Scene Builder\openjfx-14.0.1_windows-x64_bin-sdk\javafx-sdk-14.0.1\lib" --add-modules javafx.controls,javafx.fxml

我尝试使用"-clean"在eclipse.ini文件中,但没有帮助.实际上,当我尝试创建一个新的简单项目并再次执行所有步骤时,Java甚至都无法识别JavaFX.

I tried to use "-clean" in eclipse.ini file but it didn't help. Matter fact, when I tried to create new simple project and follow all the steps again, Java doesn't even recognize JavaFX.

谢谢!

推荐答案

谢谢大家!我设法使它工作.我安装了最新的Eclipse IDE 2020-09

Thanks everyone! I managed make it work. I installed the latest Eclipse IDE 2020-09

版本:2020-09(4.17.0)内部版本号:20200910-1200

Version: 2020-09 (4.17.0) Build id: 20200910-1200

重新安装jdk15.0.1并将其放置在Modulepath而不是Classpath下,并且它现在可以工作.

Installed jdk15.0.1 back and placed it under Modulepath not under Classpath and it is working now.

在此处输入图片描述

这篇关于得到“找不到模块javafx.controls".错误的Java Eclipse IDE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆