[英]Eclipse Plugin - Unable to Resolve Swing Class References
( Disclaimer : Neither of the following are true: (1) Java is my forte, and (2) I'm a pro at Plug-in development.) (免责声明:以下均不正确:(1)Java 是我的强项,并且(2)我是插件开发的专家。)
My Eclipse plug-in project includes 5 plugins.我的 Eclipse 插件项目包括 5 个插件。 2 of them compile just fine.
其中2个编译得很好。 The 3 that don't include dependencies on classes in the
org.eclipse.swt.widgets
or org.eclipse.swt.graphics
packages. 3 不包含对
org.eclipse.swt.widgets
或org.eclipse.swt.graphics
包中的类的依赖关系。 The (extremely annoying) compile-time error message is: (非常烦人的)编译时错误消息是:
The type org.eclipse.swt.widgets.Control cannot be resolved.
It is indirectly referenced from required .class files.
Now, I've been over this workspace with a fine-toothed comb.现在,我已经用细齿梳子浏览了这个工作区。 I've checked and rechecked the following:
我已经检查并重新检查了以下内容:
I've googled and stackoverflowed till my eyes are bleeding.我用谷歌搜索和计算器溢出,直到我的眼睛都在流血。 None of the typical suggestions seem to be helping.
典型的建议似乎都没有帮助。
I'm certain however, that the usual truth is going to prove to be the case here.然而,我敢肯定,通常的事实将在这里证明。 ( All things being equal, the answer is usually something simple, stupid, and painfully obvious. )
(在所有条件相同的情况下,答案通常很简单、愚蠢且显而易见。 )
Can someone kindly suggest something I haven't yet looked at?有人可以提出一些我还没有看过的东西吗? I'm more than willing to provide whatever information you may require.
我非常愿意提供您可能需要的任何信息。
PS And might I note that there are way too many places to look to configure dependencies for plugins? PS我可能会注意到,有太多的地方可以去看看配置依赖关系的插件? Great googly moogly.
很棒的googly moogly。
There is a disconnect between your target platform and the swt plugins available in your environment.您的目标平台与环境中可用的 swt 插件之间存在脱节。
The fields in the "Target Environment" will be used to load your swt plug-in. “目标环境”中的字段将用于加载您的 swt 插件。 The any field not filled in, will default to the values detected for the current environment.
未填写的任何字段将默认为为当前环境检测到的值。
In your case, you have an win32.x86 swt jar.就您而言,您有一个 win32.x86 swt jar。 If you are running on 64-bit windows, and the Architecture field is blank, your 32-bit swt jar will not load.
如果您在 64 位 Windows 上运行,并且 Architecture 字段为空,则您的 32 位 swt jar 将不会加载。 You have two options to fix any discrepancies:
您有两个选项可以修复任何差异:
That basically means that it is an indirect unsatisfied dependency: a class from a library you're using needs some other class to be on the class-path :)这基本上意味着它是一个间接的未满足的依赖项:您正在使用的库中的类需要一些其他类在类路径上:)
Now I have no idea how you manage your dependencies (maven or manually) but as a starting point you could use jarfinder.com to find and download the necessary library if you don't have it already: http://www.jarfinder.com/index.php/java/info/org.eclipse.swt.widgets.Control现在我不知道您如何管理您的依赖项(maven 或手动),但作为起点,您可以使用 jarfinder.com 来查找和下载必要的库(如果您还没有): http://www.jarfinder。 com/index.php/java/info/org.eclipse.swt.widgets.Control
If you're using Maven, you should look in the logs as it tries to download all the necessary libraries, dependencies included.如果您使用的是 Maven,您应该查看日志,因为它尝试下载所有必要的库,包括依赖项。 So if anything went wrong it should point out in the log a connectivity problem or the impossibility of downloading an artefact for some other reason.
因此,如果出现任何问题,它应该在日志中指出连接问题或由于其他原因无法下载人工制品。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.