I realize that in eclipse you can specify certain .jar libraries to add for individual projects, but I was wondering if it was possible to make it such that eclipse automatically adds standard .jar's to the classpath for all projects. I'm using eclipse for a java course and would like to be able to automatically use the course's stdlib for all projects.

As a side note: in order to get this to work I had to change the compiler setting for 'forbidden' methods since it was an external library, at least I'm guessing that's why. I set it to ignore.
–
themaestroFeb 6 '11 at 6:19

@themaestro How do you edit the compiler setting? I'm getting the same error.
–
AnnanMar 20 '12 at 11:50

I can't think of a way to do what you want specifically, but what I would recommend, if there were many of these jars, is to create a project to hold these jar files, put them in the projects classpath, and then set the project to export those jar files (that may be the default for jars in the lib directory, I can't remember).

Then any new projects can simply add a dependency on this "jar" project to get all the jars in there included in its build path.

You can adapt a dependency control and build system like maven and put your dependency jars are properties for the maven modules. This way maven is in charge of putting the jars in a shared place in the maven repository and reusing them across projects. You can then use the Maven eclipse project generator to create your workspace for eclipse. If you project is getting rather big with lots of individual projects in the workspace this is a great automation solution.