Tuesday, January 8, 2008

easily share eclipse user libraries (windows)

Use when:
1. working on a project on more that two computers (ie. work and home pc)
2. working on multiple projects that share common libraries
3. projects need to be easily passed around with minimal configuration
4. multiple developers are working on single project



========

  1. store all java libraries on a single folder. make sure each library is in its own folder.
  2. create a network share on this folder, and have it mapped to J: drive. if multiple machines are going to access the same set of libraries, have one of them act as a repository for the libraries and have the others map J: drive to it.
  3. in eclipse, goto Window>Preferences>Java>Build Path>User Libraries and create User Libraries for each entry in J:. no need to run steps 3-6 on all machines.
  4. click Export.
  5. click Select All and specify a filename for the .userlibraries file.
  6. click OK to export and save your settings.
  7. copy and distribute the .userlibraries file to all the other machines.
  8. in their User Libraries window, click Import and look for the copied .userlibraries file.
  9. click OK and save your settings.

No comments: