当从插件“org.eclipse”调用代码时发生了问题。导出可部署的Eclipse插件

时间:2020-11-29 22:25:38

I'm building an eclipse plug-in. Execution env is JavaSE-1.6

我正在构建一个eclipse插件。执行env java se - 1.6

I can deploy the plug-in without any errors, but when the plug-in runs there is an error coming out of it:

我可以不带任何错误地部署插件,但是当插件运行时,会产生错误:

"Problems occurred when invoking code from plug-in:

“从插件调用代码时出现的问题:

"org.eclipse.jface"

“org.eclipse.jface”

Exception stack trace starts with:

异常堆栈跟踪开始于:

java.lang.NoClassDefFoundError: swing2swt/layout/BorderLayout

Obviously, i have swing2swt.jar in my own plug-in's runtime and classpath, but it seems as though a org.eclipse.jface plugin can't find this library.

很明显,我有swing2swt。在我自己的插件的运行时和类路径中添加jar,但是看起来好像是一个org.eclipse。jface插件找不到这个库。

In a desperate act, i put swing2swt.layout package in the "Runtime > Exported Packages" list, imagining this will somehow expose the swing2swt.jar - but this has not resulted success.

在一次绝望的表演中,我放了swing2swt。在“运行时>导出包”列表中布局包,想象一下这会以某种方式暴露swing2swt。但这并没有带来成功。

Appreciate any help on the issue.

感谢在这个问题上的任何帮助。

1 个解决方案

#1


1  

You need to add this to Bundle-ClassPath in MANIFEST.MF.

您需要在MANIFEST.MF中将其添加到绑定类路径中。

And of course to build.properties to have it bundled in exported plugin.

当然还有建造。属性将它绑定到导出的插件中。

#1


1  

You need to add this to Bundle-ClassPath in MANIFEST.MF.

您需要在MANIFEST.MF中将其添加到绑定类路径中。

And of course to build.properties to have it bundled in exported plugin.

当然还有建造。属性将它绑定到导出的插件中。