Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Sharing jar files among plugins
Sharing jar files among plugins [message #226031] Sat, 18 March 2006 13:12 Go to next message
Larry is currently offline LarryFriend
Messages: 26
Registered: July 2009
Junior Member
Looking for doc on how to make jars in one plugin visible to other
plugins. Right now we're putting this in the .classpath of the consuming
plugin:

<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
<accessrules>
<accessrule kind="accessible" pattern="*/**"/>
</accessrules>
</classpathentry>

as well as adding the plugin containing the jar to the Require-bundle
section of MANIFEST.MF and listing the exported packages in the supplying
plugin's MANIFEST.MF.

but that seems backwards. Eclipsepedia talks about using a <runtime/>
element in plugin.xml but that's old school now. If there is no doc, we
can live with this, but would it be good to specify a single directory to
search in the supplying plugin to reduce searching? The variations on
pattern= that I've tried all fail.
Re: Sharing jar files among plugins [message #226060 is a reply to message #226031] Sun, 19 March 2006 18:37 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

You shouldn't be accessing the classpath entry at all. That is done by
the PDE, not you. you should only be updating the MANIFEST. That will
then be reflected by PDE to all plugins that depend on that plugin the
manifest is in.

In fact, don't change the manifest directly, use the MANIFEST editor and
use the packages page to indicate which packages are visible to down
stream plugins. That way you don't need to worry about the syntax in the
manifest file itself. the PDE will handle it.

--
Thanks,
Rich Kulp
Re: Sharing jar files among plugins [message #226106 is a reply to message #226031] Mon, 20 March 2006 14:52 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

So you can add your jars correctly to their plugin runtime (in the
manifest) ... then your other plugin depends on the jar-containing
plugin, and you don't have to worry about classpaths at all.

I use a list like
http://dev.eclipse.org/newslists/news.eclipse.platform/msg48 366.html to
add jars to my plugin classpath and re-export them correctly.

Later,
PW


Re: Sharing jar files among plugins [message #226172 is a reply to message #226106] Mon, 20 March 2006 18:27 Go to previous messageGo to next message
Larry is currently offline LarryFriend
Messages: 26
Registered: July 2009
Junior Member
Thanks, Paul

I tried your approach and got

restriction: The type Filter is not accessible due to restriction on
required library com.txe.osgi.servlet.api/lib/j2ee-1.4.jar



The package containing Filter is on the Exported Packages list of the plugin
that supplies it.

"Paul Webster" <pwebster@ca.ibm.com> wrote in message
news:dvmfln$6o4$1@utils.eclipse.org...
> So you can add your jars correctly to their plugin runtime (in the
> manifest) ... then your other plugin depends on the jar-containing plugin,
> and you don't have to worry about classpaths at all.
>
> I use a list like
> http://dev.eclipse.org/newslists/news.eclipse.platform/msg48 366.html to
> add jars to my plugin classpath and re-export them correctly.
>
> Later,
> PW
Re: Sharing jar files among plugins [message #226193 is a reply to message #226172] Mon, 20 March 2006 19:46 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Larry Stevens wrote:
> Thanks, Paul
>
> I tried your approach and got
>
> restriction: The type Filter is not accessible due to restriction on
> required library com.txe.osgi.servlet.api/lib/j2ee-1.4.jar

after you updated the manifest Bundle-ClassPath and the exported
packages, did you use "project popup menu>PDE Tools>Update classpath..." ?

it takes the runtime classpath and adds it to the project's build
path>Export and Order tab.

Later,
PW


Previous Topic:Lemo COBOL IDE
Next Topic:How to make a project build a jar automatically
Goto Forum:
  


Current Time: Thu Apr 25 03:53:18 GMT 2024

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

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

Back to the top