Change java build path for multiple projects in Eclipse

TestRaptor picture TestRaptor · Apr 1, 2015 · Viewed 11.5k times · Source

In Eclipse, I have a libs project. This project has a test.jar file.

I have 15 other projects in eclipse that use test.jar under Java Build Path/Libraries.

New versions of test.jar are made every month, and the name will change (test1.jar, test2.jar)

Once a new version is available, I remove the old one from the libs project and add the new one. My question is, how can I modify the 15 projects that use this jar file to reference the new one? I know how to do it one project at a time by configuring the build path for each project. Is there a way to make a mass change to all 15 projects at the same time?

Answer

prashant thakre picture prashant thakre · Apr 1, 2015

To achieve the same follow the steps below.

  1. Open Eclipse, go to Windows > Preferences-> Java > Build Path -> User Library
  2. Now click on new button and give name like TEST_JAR and add after that just add the jar it could be test.jar or test.jar. see the below screen shot.

  1. Only one time task delete the entry from all 15 project from its build classpath as its set in global path.

  2. Whenever you will be build other project it will also bundle you User libraries.