tags:

views:

256

answers:

1

I've created a new project in Eclipse and I want to include the ANTLR jar file.

Where do you typically place your jar files before referencing them in your project? Do you create a "Source Directory" in eclipse, or a normal "Directory"? Do you then reference them from there?

I want to be able to easily transport this project around and not declare references to jar files outside my projects folder but I'm not sure what the normal convention is to do in the Java world.

Any guidance would be appreciated.

+4  A: 

I usually create a /lib directory in which I place all 3rd party JARs. Then I tell Eclipse to add all those JARs to my compile and runtime CLASSPATH. I believe it's right click on "project", choose "Build Path > Libraries" (per Balus-C), and then modify CLASSPATH. Sorry I'm not more specific, but I don't use Eclipse. I prefer IntelliJ, but the idea is the same for all Java IDEs.

duffymo
It's actually *Build Path* > *Libraries*.
BalusC
(shrug) Like I said, I use IntelliJ.
duffymo