Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Using third-party jars bundled inside another plugin.
Using third-party jars bundled inside another plugin. [message #889916] Wed, 20 June 2012 08:55 Go to next message
Ana H is currently offline Ana HFriend
Messages: 7
Registered: February 2012
Junior Member
I'm building a RCP application and I have 9 plugin projects. My plugins are using several third-party jars (25 jars in total). Many of them are using the same jars so I would like to place all of the required jars inside one of the plugins (lets call it a BasePlugin) and use them from there (to avoid having many copies of the same jar bundled inside each plugin which uses it).
I don't know how to configure other plugins to use these jars, I'm getting java.lang.NoClassDefFoundError when I'm starting the application. In each plugin I have added this line to a Manifest
Require-Bundle: BasePlugin

Any suggestions?


Is this the right approach? All of these third-party jars are also a regular Eclipse plugins, so maybe I don't even have to pack them inside another plugin? But then I don't know how to include them to my RCP application (to have them exported to the 'plugins' folder after exporting the RCP).
Re: Using third-party jars bundled inside another plugin. [message #889964 is a reply to message #889916] Wed, 20 June 2012 12:22 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

In general when using 3rd party jars, you should convert them to OSGi bundles (just give them an OSGi MANIFEST.MF that exports all of their packages). But if they came with eclipse they're already plugins.

In any case, whatever drives the build of your RCP app (either the .product file or one of your features) has to list all of the plugins you want included in that app. That's what will cause the plugins to show up in rcpApp/plugins directory.

PW


Previous Topic:Exporting RCP, compilation errors
Next Topic:migrate existing 3.x RCP to e4
Goto Forum:
  


Current Time: Fri Dec 19 09:23:17 GMT 2014

Powered by FUDForum. Page generated in 0.01718 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software