jump to navigation

Making External Libraries available as an Eclipse Plug-in March 8, 2007

Posted by shahan in eclipse plugin.

Sometimes it’s desirable to maintain the library code separately from the plug-in being developed. Converting the library to a plug-in won’t change its structure and there is minimal maintenance required. To go through the conversion, follow these steps:

1. right-click on the project representing the library and in the context menu proceed to “PDE-Tools” and select “Convert Project to Plug-in Projects…

It’s that easy. The plugin is automatically exported when running/debugging an Eclipse instance during plug-in development.

If your library itself relies on jar files, those will have to be included in the manifest file.This will also give you access to some of the features you allow to be exposed to other plug-ins dependent on your library plug-in. In the manifest file:

– in the runtime tab, add the external jar files to your plug-in classpath

– in the runtime tab, select the packages that you would like other plug-ins to have access to, preferrably your library packages at the minimum and optionally the external library packages that your library itself uses.

– in the overview tab you can rename your plug-in and apply versioning

Once the plug-in is configured as desired, simply include this plug-in in the dependency tab of the other plug-in’s manifest file and you’ll have access to your library plug-ins exported packages.



1. Paul - February 5, 2009

Thank you! This was driving me insane.

2. Keith - March 20, 2009

This was extremely helpful! I could not figure out what the problem was at first, but this solved it for me. Thanks

3. Guicy Mocks in Eclipse RCP - November 24, 2010

[…] this short introduction of Guice, it is time to package this 3rd-party library into the Eclipse RCP client. In fact it is all about putting the JARs (guice-2.0.jar, aopalliance-1.0.jar) into some folder […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: