导出Eclipse插件时出错 [英] ERROR exporting Eclipse Plug-In

查看:156
本文介绍了导出Eclipse插件时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Eclipse Oxygen中导出Eclipse Plgug-In,但是出现以下错误(仅2个):

I'm trying to export an Eclipse Plgug-In in Eclipse Oxygen, but I get the following errors (only 2):

当我使用xerces导入,然后使用下面的Base64对象,但是在我编译时,错误发生在我的Java类之一,端代码1

The error is in one of my Java Classes, emitter1, when I use the xerces import and then the Base64 Object below, but when I compile the plug-in in the IDE in runs with no errors,

这是我的项目树的图像:

Here's an image of my projects tree:

就像我说的那样,在generator1类中使用了导入和对象,

The import and the object are being used, like I said, in the emitter1 class,

有人知道为什么发生这种情况以及如何解决吗?

Does anyone know why this is happening and how to solve it?

也许我不能在插件中使用引用的库在项目中,或者我必须以不同的方式添加它们办法吗?我所做的是:右键单击Project-> Properties-> Java Build Path-> Add External Jars,并添加了xerces jar

Maybe I can't use referenced libraries in plug-in projects, or I have to add them in a different way? What I did was: Right-Click on Project -> Properties -> Java Build Path -> Add External Jars, and added xerces jar

谢谢!

Alexandre Jacinto

Alexandre Jacinto

推荐答案

您不能在插件中使用外部jar。您只能引用包含在插件中的其他插件或jar中的代码,并将其添加到MANIFEST.MF中的 Bundle-Classpath 中(并更新构建。属性,以将jar包含在构建中。)

You can't use external jars in a plugin. You can only reference code in other plugins or jars which you include as part of your plugin and add to the Bundle-Classpath in the MANIFEST.MF (and also update the build.properties to include the jars in the build).

我的一个插件中的示例 Bundle-Classpath

An example Bundle-Classpath from one of my plug-ins:

Bundle-ClassPath: .,
 lib/jogg-0.0.7.jar,
 lib/jorbis-0.0.15.jar,
 lib/vorbisspi1.0.2.jar

是您的常规代码,其他条目是 lib中的jars 目录。

The . is your normal code and the other entries are jars in a lib directory in the plugin project.

build.properties 将包含

bin.includes = ....... other things
               .,\
               lib/jogg-0.0.7.jar,\
               lib/jorbis-0.0.15.jar,\
               lib/vorbisspi1.0.2.jar

如果使用普通的plugin.xml / MANIFEST.MF / build.properties编辑器,则在类路径部分的运行时选项卡上定义捆绑包类路径,并在build.properties选项卡。

If you use the normal plugin.xml/MANIFEST.MF/build.properties editor you define the bundle classpath on the 'Runtime' tab in the 'Classpath' section and the build.properties on the build.properties tab.

不幸的是,当您在Eclipse中测试插件时,Eclipse不会检查任何一项。错误仅出现在导出的插件和RCP中。

Unfortunately Eclipse doesn't check any of this when you test your plugin within Eclipse. The errors only appear in exported plugins and RCPs.

这篇关于导出Eclipse插件时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆