Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Sharing JAR Files(Looking for a way to share jars between bundles)
Sharing JAR Files [message #632713] Thu, 14 October 2010 03:35 Go to next message
Robert Brown III is currently offline Robert Brown IIIFriend
Messages: 36
Registered: July 2009
Member
Greetings, all:

I have been breaking up a monolithic application into bundles. I have been able to work out the dependencies between the different bundles, and my application so far is working well.

I do have one problem, though: many of the classes in several bundles all depend on certain 3rd- party JAR files. I have been including those jars in the various bundles, but now I have several bundles that have copies of the same three JAR files.

Is there some way that someone can bundle up a set of JARs so that the JARs can be shared between multiple bundles? I'd really like to eliminate these multiple copies of files, if possible.

Re: Sharing JAR Files [message #632833 is a reply to message #632713] Thu, 14 October 2010 12:34 Go to previous messageGo to next message
Thomas Watson is currently offline Thomas WatsonFriend
Messages: 503
Registered: July 2009
Senior Member
Have you considered placing the content of the 3rd-party jars into their own bundle and exporting the packages they provide (using Export-Package manifest header). This would allow all your other bundles to use Import-Package to access the 3rd party packages.

HTH

Tom
Re: Sharing JAR Files [message #632845 is a reply to message #632833] Thu, 14 October 2010 13:29 Go to previous messageGo to next message
Robert Brown III is currently offline Robert Brown IIIFriend
Messages: 36
Registered: July 2009
Member
Tom:

I did not think that you could do that. I did not know that a bundle could actually export the packages within third- party JAR files.

I will try this and see what happens...
Re: Sharing JAR Files [message #632853 is a reply to message #632713] Thu, 14 October 2010 13:45 Go to previous message
Robert Brown III is currently offline Robert Brown IIIFriend
Messages: 36
Registered: July 2009
Member
I tried it. I used a bundle that I was already exporting and using as a required bundle for the other bundles (it contains data objects required by everyone). I just made it export the packages in the third- party JARs. It works!

Wow! This stuff is kewl!

Thanks, Tom!
Previous Topic:Bad projects in Eclipse
Next Topic:Dynamic Service Discovery/Loading
Goto Forum:
  


Current Time: Thu Mar 28 22:21:28 GMT 2024

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

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

Back to the top