问题
I downloaded an eclipse project that has a .classpath which has class entries that need to be updated.
What does this do exactly? Can I change the content of the .classpath in eclipse?
I opened User Libraries in eclipse expecting it to have the same content as .classpath, but there is nothing in it.
回答1:
The contents of the .classpath file can be changed by modifying the project Java Build Path parameters.
For instance, in Package Explorer, right-click on the project and select Properties... In the Properties dialog, navigate to Java Build Path in the tree. Usually the Source and Libraries tab panels provide most of the information in the .classpath file.
回答2:
.classpath file stores the classpath metadata info about the project.
There are two ways to edit it: 1. Through UI : right click project -> build path , modify here and you will see changes in .classpath
2.(not advisable) : edit .classpath file, be careful as a small error cud corrupt project. Edit, save then build/refresh . You should see it updated in buildpath ui. If not, restart eclipse it will pick new .classpath .
来源:https://stackoverflow.com/questions/12570286/classpath-contents-update-in-eclipse