[英]ERROR exporting Eclipse Plug-In
I'm trying to export an Eclipse Plgug-In in Eclipse Oxygen, but I get the following errors (only 2): 我正在尝试在Eclipse Oxygen中导出Eclipse Plgug-In,但是出现以下错误(仅2个):
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, 当我使用xerces导入,然后使用下面的Base64对象时,该错误出在我的Java类之一内,但是当我在IDE中编译该插件而没有错误时,
Here's an image of my projects tree: 这是我的项目树的图像:
The import and the object are being used, like I said, in the emitter1 class, 就像我说的那样,在generator1类中使用了导入和对象,
Does anyone know why this is happening and how to solve it? 有谁知道这是为什么发生以及如何解决?
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
我所做的是:右键单击Project-> Properties-> Java Build Path-> Add External Jars,并添加xerces jar
Thank you! 谢谢!
Alexandre Jacinto 亚历山大·雅辛托(Alexandre Jacinto)
You can't use external jars in a plugin. 您不能在插件中使用外部jar。 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). 您只能引用包含在插件中的其他插件或jar中的代码,并将其添加到MANIFEST.MF的
Bundle-Classpath
中(并更新build.properties以将jar包含在构建中)。
An example Bundle-Classpath
from one of my plug-ins: 来自我的一个插件的示例
Bundle-Classpath
:
Bundle-ClassPath: .,
lib/jogg-0.0.7.jar,
lib/jorbis-0.0.15.jar,
lib/vorbisspi1.0.2.jar
The .
的
.
is your normal code and the other entries are jars in a lib
directory in the plugin project. 是您的常规代码,其他条目是插件项目中
lib
目录中的jars。
The build.properties
would include build.properties
将包括
bin.includes = ....... other things
.,\
lib/jogg-0.0.7.jar,\
lib/jorbis-0.0.15.jar,\
lib/vorbisspi1.0.2.jar
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. 如果使用常规的plugin.xml / MANIFEST.MF / build.properties编辑器,则在“类路径”部分的“运行时”选项卡上定义捆绑软件类路径,并在build.properties选项卡上定义build.properties。
Unfortunately Eclipse doesn't check any of this when you test your plugin within Eclipse. 不幸的是,当您在Eclipse中测试插件时,Eclipse不会检查所有这些。 The errors only appear in exported plugins and RCPs.
错误仅出现在导出的插件和RCP中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.