Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » common jars in different project
common jars in different project [message #659916] Wed, 16 March 2011 06:37 Go to next message
naresh c is currently offline naresh cFriend
Messages: 3
Registered: March 2011
Junior Member
I have multiple spring project in eclipse. A lot of them use common jars. Some project require some specific jars and other do not required them. Is it possible in eclipse that i copy all the jars in a common location and then have some kind of config file to only pick up the required jars.
Re: common jars in different project [message #660028 is a reply to message #659916] Wed, 16 March 2011 14:48 Go to previous message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3798
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 16-Mar-11 00:37, naresh c wrote:
> I have multiple spring project in eclipse. A lot of them use common
> jars. Some project require some specific jars and other do not required
> them. Is it possible in eclipse that i copy all the jars in a common
> location and then have some kind of config file to only pick up the
> required jars.

There are several different types of JARs and what best to do with them
depends on which type.

The first type are those that accompany the JDK. I don't think these are
those that concern you and I don't think you should do much else than
leave them as they are.

Second, the JARs that you create yourself. I don't think these concern
this question either and you can "conflate" them into a sort of
subproject (there's no such thing in Eclipse, but you can create a
project that other Eclipse projects consume or depend upon, or you can
set it up that the resulting JAR(s) of that project are consumed by
still other projects).

Third are the third-party JARs you get from various places such Apache
Commons, Spring Source, RichFaces, Hibernate, etc. I assume that these
are those of which you speak.

Typically, I create several User Libraries (Eclipse terminology) to
handle these. So, I'm not dealing with myriad copies of them, but only a
specification as to where they exist in (the one place inside) my
filesystem. The User Library is (usually) a collection of more than one
JAR. Sure, in many cases, not every JAR is useful to every consuming
project, however, there is no harm or waste.

At the risk of boring you, I suggest you might peruse this article:

http://www.javahotchocolate.com/tutorials/jars.html

In addition, you can use Maven in your project to be very exact as to
which JAR(s) is(are) consumed.

Note that there may be much else to say on this topic and many others
may have different (and in some cases even better) ideas than what I can
offer.
Previous Topic:please check my ini - conflicts?
Next Topic:Eclipse for PHP Developers + Eclipse for JavaScript Web Developers in one Eclipse Installation?
Goto Forum:
  


Current Time: Sun Sep 22 03:33:30 GMT 2024

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

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

Back to the top