• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Where to put the Jars in Eclipse

 
Ed Dablin
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Pie
Posts: 50278
80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 18304
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic