且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Eclipse未运行JavaFX应用程序-运行'java'应用程序

更新时间:2021-09-28 01:18:01

所以我知道这是一个老问题,但是最近我遇到了相信这个问题,并希望分享找到的解决方案(尽管我对为什么起作用没有任何见识).

So I know this is an old question, but I ran into what I believe to be the same issue recently and wanted to share the solution I found (although I have no insight as to why it works).

如图

转到主类的运行配置",然后在参数"选项卡上,取消选中显示使用SWT启动时使用-XstartOnFirstThread参数"的框.

Go to Run Configurations for the main class, and on the "Arguments" tab, uncheck the box where it says "Use the -XstartOnFirstThread argument when launching with SWT".

添加一个直观的问题示例,以便比我可能更了解的人解释为什么会发生这种情况/为什么此解决方案有效:

To add a visual example of the problem so that someone more knowledgable than I can possibly explain why this happens/why this solution works:

是您尝试运行程序时得到的.名为"java"的应用程序似乎正在运行,但未显示任何内容.

This is what you get when you try to run the program. An application simply called "java" appears to be running, but nothing is showing.

我希望这些信息能够对某人有所帮助.

I hope this information is able to help someone.