简体   繁体   English

如何使用 Eclipse/WindowBuilder 解决“对‘复合’的不可解析引用”?

[英]How do I resolve "unresolvable reference to 'Composite'" using Eclipse/WindowBuilder?

Trying to setup my first Java environment and give it a go and immediately running into issues.尝试设置我的第一个 Java 环境并为其提供 go 并立即遇到问题。

"No proposals have been found to fix the unresolvable reference to 'Composite'" “没有找到解决无法解决的对‘复合’的引用的建议”

I read this post我读了这篇文章

https://www.bitdegree.org/tutorials/how-to-code-in-java/ https://www.bitdegree.org/tutorials/how-to-code-in-java/

installed JDK 16 and Eclipse 2021安装 JDK 16 和 Eclipse 2021

Installed Window Builder via Help - Install...通过帮助安装 Window Builder - 安装...

Then started following the steps in this video to create a new Hello World example: https://www.eclipse.org/windowbuilder/然后开始按照此视频中的步骤创建一个新的 Hello World 示例: https://www.eclipse.org/windowbuilder/

but I get stuck right around where the video is at on 0:37 seconds但我在 0:37 秒时卡在视频所在的位置

在此处输入图像描述

After dealing with this problem myself, I've finally come to a resolution, I understand that it's been a while since you asked this question.在自己处理了这个问题之后,我终于有了一个解决方案,我知道你已经有一段时间没有问这个问题了。 but hopefully if someone else has the issue they can come across this instead of busting their head over figuring it out.但希望如果其他人有这个问题,他们可以遇到这个问题,而不是为了解决这个问题而绞尽脑汁。

After generating the composite file, where it says "import org.eclipse.swt.widgets.Composite;"生成复合文件后,其中显示“import org.eclipse.swt.widgets.Composite;”

Bring up the quick fixes menu and select "Add 'requires org.eclipse.swt.win32.win32.x86_64' to module-info.java"调出快速修复菜单和 select “将 'requires org.eclipse.swt.win32.win32.x86_64' 添加到 module-info.java”

Then head over to the module-info.java file, and on the newly-generated requires statement, select the quick fix "Move classpath entry 'org.eclipse.swt.win32.win32.x86_64... to modulepath" This immediately resolved all of the issues for me. Then head over to the module-info.java file, and on the newly-generated requires statement, select the quick fix "Move classpath entry 'org.eclipse.swt.win32.win32.x86_64... to modulepath" This immediately resolved对我来说所有的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在 windowbuilder eclipse IDE 上调整按钮大小? - How do I resize buttons on windowbuilder eclipse IDE? 在Eclipse中为Java应用程序使用windowbuilder进行I / O - I/O using windowbuilder in eclipse for a java application 如何调用使用 windowBuilder (Eclipse) 创建的类 - How to call a class that was created using windowBuilder (Eclipse) Java / Eclipse(WindowBuilder 插件)- 如何有效使用 Swing Actionlisteners? - Java / Eclipse (WindowBuilder plugin) - how do I effectively use Swing Actionlisteners? 我可以使用Eclipse windowbuilder链接两个JFrame窗口吗? - Can I link two JFrame windows using Eclipse, windowbuilder? 如何在Eclipse中使用Windowbuilder填充JTable? (请参见GUI的屏幕截图) - How to populate JTable using Windowbuilder in Eclipse? (See screenshots of the GUI) 使用Eclipse WindowBuilder时如何在FormPage类中调用createFormContent()方法 - How to call createFormContent() method in FormPage class when using eclipse WindowBuilder 如何使用WindowBuilder在Eclipse Mars中调整标签顺序 - How to adjust tab order in Eclipse Mars using WindowBuilder 如何让 Eclipse WindowBuilder 解析继承的 JFrame? - How can I make Eclipse WindowBuilder parse an inherited JFrame? 如果通过Java中的DNS无法解析,如何获取本地主机名? - How do I get the local hostname if unresolvable through DNS in Java?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM