Create your own classpath variable in Window->Preferences->Java->Classpath Variables
Then you can use it to append paths to in a project:
- goto Project->Properties->Java Build Path->Libraries tab
- Hit Add Variable... button on the Libraries tab
- Select a variable from the select box and hit Extend...
- Navigate to a jar file and hit OK
- A parameterized path to a jar on the file system is now added to your build path.
This is handy for accessing jars outside of the project in a parameterized way, such as a jar repository like in Maven (which is how I learned this trick).
It is most useful in a team environment where you're sharing Eclipse .project and .classpath files but you don't necessarily want to hard-code absolute file paths in the .classpath files (so they'll be portable from one machine to another).
Parameterize the common root path as a new Classpath Variable and then build up the build path by extending the variable as many times as you have jar files and save the project. The variable is stored as part of the paths in the .classpath file.
When others import your project (and hence the .classpath) each developer just has to set the value of the particular Classpath Variable (which will show up in the task view with "Missing required library" messages because the jar paths can't be resolved until the variable is defined) to the full path to the root of the repository on their local machine.
Search for them in Eclipse Help. I tried to get these to work (exporting a set of interlinked projects to a .psf file), and the export did seem to work. But the import of the .psf (which should load all the interlinked projects in the project set together without importing each one individually) failed -- it just hung Eclipse forever while putting up a dialog box with a progress bar showing no progress. This would be a great productivity enhancer for me right now, where I'm working with 10 or so related projects that sometimes need to be deleted and re-imported (or Eclipse restarted) because of some change across all of their configurations (change in the .project or .classpath).
I'm using the Rational ClearCase plugin for Eclipse, so sometimes I wonder if a problem like this is in the plugin or in Eclipse.