Sometimes, when you look for the corresponding class by ctrl + shift + t, the class obviously exists and is also under the compilation path, but it just can’t be found. One possible reason is that the index created by Eclipse for the class is wrong.
The solution is: find the .metadata/.plugins/org.eclipse.jdt.core folder under the project workspace, delete the *.index file and the savedIndexNames.txt file, restart eclipse, and then eclipse will rebuild the index, and then the problem will be solved. The problem can be solved.
Sometimes, the indexes that Eclipse use for searching the types, get corrupted. You can clear the Open Type indexes by going to <Workspace>/.metadata/.plugins/org.eclipse.jdt.core and deleting all files there. The indexes will be re-built the next time you use open type.
Note that this is a empirical observation, and you may delete some JDT saved data that you don’t want to delete. I observed no ill effects, but for safety you could try deleting just the *.index files and the “savedIndexNames.txt”, and see if it works.
- Solve the initialization Java tooling exception information when eclipse starts
- Invalid project name: Project “XXX” already exists
- MyEclipse startup error: ‘building workspace’ has been accounted for a problem solution
- After modifying Tomcat’s server.xml, the Tomcat deployment project reported an error: removing observe files from server… Could not clean server
- MyEclipse open JSP report unhandled event loop exception no more handles error
- Specified VM install not found Error [How to Solve]
- Oracle Script: How to Solve ‘unusable state index(ORA-01502)’
- Several common error reporting and startup problems of Tomcat
- Eclipse debug has no response and no error report