4

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.

enter image description here

prosseek
  • 182,215
  • 215
  • 566
  • 871
  • I just opened one my eclipse project's .classpath file and I see list of java class paths(the file meaning the same thing actually). You can update the class path of course but if you configure project deployment+classpath, Eclipse should override the .classpath file. So I think you do not have deal with the file manually. Just configure the project from eclipse project properties. – Elbek Sep 24 '12 at 18:02

2 Answers2

5

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.

Dan D.
  • 32,246
  • 5
  • 63
  • 79
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 .

Mukul Goel
  • 8,387
  • 6
  • 37
  • 77