Dependency on a jar file [message #239341] |
Wed, 31 October 2007 22:46 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.08652 seconds