Javafx设置无法正常工作,因为可能存在环境变量

发布于 2025-01-28 17:00:10 字数 963 浏览 2 评论 0原文

我将在项目上使用Javafx。我不是专家,但我确实在没有重大问题的情况下安装了一次。

但是我切换到了一台新计算机,在尝试安装后,我无法构建它。首先,我收到了这样的消息:

javafx Runtime组件缺少组件,然后获得java.lang.module.findexception:module javafx.controls找不到

,我确实检查了其他帖子与上述问题有相同的错误,但没有解决问题的方法,现在消息是

未识别的选项: - 模块路径错误:无法创建Java虚拟机。错误:发生了致命的例外。程序将退出。

(请注意,我正在使用VS代码,并且没有构建工具,我正在引用库使用javafx)

通往javafx的路径

启动

。 a href =“ https://i.sstatic.net/d0syw.png” rel =“ nofollow noreferrer”> jre path

环境变量

我真的与JRE,SDK和JDK感到困惑,我使用VS代码安装了SDK,但我不知道我的环境变量是否已配置,因为它们应该是...

预先感谢您的帮助,因为我不是专家,所以我不知道此信息是否足够,我希望它是:)

I will be using JavaFX on a project. I am no expert but I did install it once with no major issue or problem.

But I switched to a new computer and after trying to install it doesn't build; at first I got the message that

JavaFX runtime components were missing then got the java.lang.module.FindException: Module javafx.controls not found

and I did check other posts that had the same error as the mentioned above but got no solution to the problem and now the message is

Unrecognized option: --module-path Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit.

(Please note that I'm using VS Code and no build tools, I am referencing the libraries to use JavaFX)

Path to JavaFX

launch.json configured

JRE path

Environment variables

And I'm really confused with the JRE, SDK and JDK, I installed the SDK using VS Code but I don't know if my environment variables are configured as they should be...

Thanks in advance for the help, since I'm no expert I don't know if this information is enough, I hope it is :)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

贪恋 2025-02-04 17:00:10

​> VSCODE的Javafx 构建项目而不是Javafx SDK。

我认为主要问题仍然是由环境环境引起的。

如果您必须使用Javafx SDK,请将其放在没有空格的位置中,或者在使用时引用该路径。并且请阅读文档详细介绍。

enter image description here

enter image description here

My suggestion is to use JavaFX of vscode to build the project instead of JavaFX SDK.

I think the main problem is still caused by the environmental settings.

If you must use the JavaFX SDK, put it in a location without spaces, or quote the path when using it. And please read the document in detail.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文