Today after I switched to another workspace to work on another CVS branch. I got error in Java search "Class file name must end with .class" when I type Ctrl+Shift+G (for reference in workspace).
Options I tried:
- Clean all projects and rebuild workspace (not work)
- Close the projects and reopen again (not work)
- Close Eclipse and start again (not work)
- Add -clean in Eclipse startup script (e.g. C:\Workshop\eclipse\eclipse.exe -clean), and this worked!!
a. Close Eclipse
b. Delete
<workspace>/.metadata/.plugins/org.eclipse.jdt.core/*.index
c. Delete
<workspace>/.metadata/.plugins/org.eclipse.jdt.core/savedIndexNames.txt
d. Start Eclipse again
See http://stackoverflow.com/questions/6816/eclipse-class-file-name-must-end-with-class-exception-in-java-search
Root Cause:
Unknown, but mostly like it is Eclipse cache issue. My Eclipse version is as below
Eclipse Platform
Version: 3.4.1
Build id: M20080911-1700
Thank you for the "options" you suggested.
ReplyDeleteI had the same trouble but couldn't fix it even with de option "4" you tried.
So I continued your suggestions and it worked fin after option "b"