Win a copy of Functional Design and Architecture this week in the Functional programming forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Where to put the Jars in Eclipse

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Marshal
Posts: 73951
332
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Saloon Keeper
Posts: 24283
167
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic