简体   繁体   中英

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):

在此处输入图片说明

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:

在此处输入图片说明

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?

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

Thank you!

Alexandre Jacinto

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).

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

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

The build.properties would include

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM