I have recently upgraded a framework I am developing with and one of the jars from the old install has been upgraded to a newer version (i.e. the name of the jar is different).
All of the (200+) projects in my workspace depend on this jar and so now are displaying the following two errors:
It will take me a substantial amount of time to modify the build path of every project in my workspace, firstly removing the incorrect jar and then adding the new one.
Is there a way to add/remove a jar to all (or a group of) projects in one go?
This question illustrates adding jars using libraries - something I could use going forward but doesn't fix my current problem.
I am running Eclipse Mars 4.5.0
On the back of Chandrayya G K's answer I have found a simple solution to solve my issue that doesn't involve creating extra projects etc. - Simply find and replace the reference to the jar in the classpath.
Within eclipse press Ctrl+H to bring up the Search Window.
Click File Search Tab
In the "Containing text:" field enter the classpathentry tag that references the old jar. This can be found in the .classpath file within any of your eclipse projects. Mine looks like this:
<classpathentry kind="lib" path="C:/myjars/old-jar.jar"/>
You can then specify .classpath in "File name patterns" field to limit your search to the classpath files.
Restrict "Scope" to the whole workspace.
Click Replace
In the Replace window enter your classpathentry tag that points to your new jar.
Click OK.
*If you don't have an old jar that needs replacing you can just replace the end </classpath>
Tag with <classpathentry kind="lib" path="C:/myjars/new-jar.jar"/> </classpath>
to insert a reference to the new jar.