Where/How does Eclipse store user libraries?

后端 未结 2 819
悲&欢浪女
悲&欢浪女 2020-12-23 22:07

I am working on a Java Project in Eclipse. I created a user library called \"Spring\" and added all the Spring jars to it. My question is, where does Eclipse store this libr

相关标签:
2条回答
  • 2020-12-23 22:22

    Eclipse does not copy any of the contents of a User Library, it is merely a container with machine-specific absolute paths. The User Library definitions are stored in the workspace; specifically, in .metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs.

    The idea behind a User Library is that it is an abstraction above a collection of JARs that exist outside the project(s); each workspace must declare the contents for itself, since they are external to Eclipse projects.

    0 讨论(0)
  • 2020-12-23 22:34

    You can export them from the workspace where you created them, and import them into the workspace where you want them.

    Old: Window -> preferences -> Java -> User Libraries -> import/export

    New (not sure what eclipse version this change was introduced): Window -> preferences -> Java -> Build Path -> User Libraries -> import/export

    If that's what you were trying to do (this is how I was led to this webpage)

    Thanks @Jorn Vernee for the new version correction

    0 讨论(0)
提交回复
热议问题