1

In eclipse i was working with a java project which I had imported from perforce. By mistake I deleted the .classpath file from my workspace, now again I imported the project from perforce but the .classpath file is not generated in my workspace.

Can someone please explain what is the reason behind this and how this can be resolved.

1 Answers1

0

The .classpath is typically generated by Eclipse at the project setup or when adding new source directories. It is not created by Perforce.

  1. If your .classpath was versioned in Perforce, and you deleted it from Eclipse, check to see if the file is marked for delete in the Pending changes. If so, revert the delete to recover the file.

  2. If your .classpath was versioned in Perforce, and you Submitted the deleted, you will need to recover the deleted file from Perforce. Read the following KB article for details.

  3. If you deleted the .classpath outside of Perforce or Eclipse, right click on the project, select 'Team' --> 'Get Revision...' --> check 'Get latest revision' and check 'Force operation'.

  4. Finally, if the .classpath was never under version control you will need to rebuild it. Start by click on the source path and select 'Build Path' --> 'Configure Build Path'. Next, add all the source paths under your project and libraries (this is a bit tricky to get right). If it was a Maven project you may need to add additional containers.

paul allen
  • 238
  • 2
  • 8
  • thanks much for your answer, since it was not versioned so I configured the buildpath and was able to get the .classpath file in the workspace, it did have a duplicate entry for testNG, on removing duplicate it looked good. – moushumi das Jun 08 '15 at 23:41