Skip to main content



      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 04:55 Go to next message
Eclipse UserFriend
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 08:22 Go to previous message
Eclipse UserFriend
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: Wed Jul 23 08:26:20 EDT 2025

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

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

Back to the top