Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Dependency on a jar file
Dependency on a jar file [message #239341] Wed, 31 October 2007 22:46 Go to next message
Eclipse UserFriend
Originally posted by: andrew.baine.gmail.com

What is the preferred way to specify a dependency on a third-party jar?

I just downloaded the google collections library, unzipped it, and now I
have on my desktop the following folder:

-google-collect-snapshot-20071022
+ javadoc
- COPYING
- google-collect-snapshot-20071022.jar
- src-snapshot-20071022.zip

I want to use it in my eclipse project. I realize I can do Project >
Properties > Java Build Path > Libraries > Add External Jars. Is that
the preferred way to do this?

Thanks in advance for your help,

Andrew
Re: Dependency on a jar file [message #239346 is a reply to message #239341] Thu, 01 November 2007 01:17 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: wegener.cboenospam.com

Andrew wrote:
>
> What is the preferred way to specify a dependency on a third-party jar?
>
> I just downloaded the google collections library, unzipped it, and now I
> have on my desktop the following folder:
>
> -google-collect-snapshot-20071022
> + javadoc
> - COPYING
> - google-collect-snapshot-20071022.jar
> - src-snapshot-20071022.zip
>
> I want to use it in my eclipse project. I realize I can do Project >
> Properties > Java Build Path > Libraries > Add External Jars. Is that
> the preferred way to do this?
> Thanks in advance for your help,
>
> Andrew
>
>
>
>
It all depends on the type of project you are working on. If it is just
a Java project, then this will work. As an alternative, you could
import the jars into your project, perhaps in a library folder that you
create. You can then use the Add Jar button on the Libraries tab.

If you are working on a plugin project, then you will need to create a
plugin for the jar. Then you have to update your plugin to add a
dependency on the jar plugin.
Re: Dependency on a jar file [message #239479 is a reply to message #239341] Thu, 01 November 2007 17:32 Go to previous message
Eclipse UserFriend
Originally posted by: eclipse6.rizzoweb.com

Andrew wrote:
>
> What is the preferred way to specify a dependency on a third-party jar?
>
> I just downloaded the google collections library, unzipped it, and now I
> have on my desktop the following folder:
>
> -google-collect-snapshot-20071022
> + javadoc
> - COPYING
> - google-collect-snapshot-20071022.jar
> - src-snapshot-20071022.zip
>
> I want to use it in my eclipse project. I realize I can do Project >
> Properties > Java Build Path > Libraries > Add External Jars. Is that
> the preferred way to do this?

I would advise that you instead copy (or import) the JAR into a lib/
directory in your project and then add it to the project's Java Build
Path > Libraries tab. You can also expand the JAR in the Libraries table
to attach the source, if you want.

Hope this helps,
Eric
Previous Topic:How to change user account for SVN
Next Topic:Eclipse Help Plugin - Stale Index Files
Goto Forum:
  


Current Time: Fri Apr 26 06:39:19 GMT 2024

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

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

Back to the top