jQuery in Action, 3rd edition
The moose likes IDEs, Version Control and other tools and the fly likes Where to put the Jars in Eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Where to put the Jars in Eclipse" Watch "Where to put the Jars in Eclipse" New topic

Where to put the Jars in Eclipse

Ed Dablin
Ranch Hand

Joined: Oct 09, 2012
Posts: 32
Say you find an external class library that you like, and will want to use over and over.
I know you can add the jar files to each new project manually, but that is a lot of repetition.
Can you add them to Eclipse so that they will be available to any new project automatically, so you only have to type an import statement?
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 46320
The idea behind an Eclipse project is that it is something big, which you will spend several weeks or months working on. So you only have to load external jars rarely. And they are often different jars.
Make all your learning applications part of one large project, then you won’t have to repeat the importing.

I shall move this discussion to the IDEs forum, where you might get more comments.
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

you can add a set of libraries to *user libraries* or *classpath variables*. and then you can use them to your projects in build path.

is that you want?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17410

Back when I did stuff like that, I made a dummy project named "libs", put all the JARs in a directory in the libs project, then defined a symbolic path to them so that the consuming projects wouldn't have to code absolute paths.

These days I use Maven and the jars all come from the Maven cache automatically.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link: http://aspose.com/file-tools
subject: Where to put the Jars in Eclipse
It's not a secret anymore!