1. Quick fix
2. Recommended fix
Read Also: Could not find or load main class
[Solved] Resource is out of sync with the filesystem error in eclipse
1. Quick Fix
Quick Fix: Select the project and press F5 (Right Click -> Refresh)
1.1 Explanation For Quick Fix:
When you select the project and press F5, then this action will resync any external changes to the filesystem. After this step, the eclipse would be aware of exactly what is changed in your workspace.
1.2 The issue with Quick Fix:
It would be very difficult to perform quick fix steps every time if any of the file changes due to an external agent.
2. Recommended Fix
The recommended way is to let eclipse automatically handle this error. Follow the below steps:
Window -> Preferences -> General -> Workspace
After performing the above step, then depending upon the version of the eclipse you are using you will select one of the following options in the workspace window.
a. Refresh Automatically
b. Refresh using native hooks or polling
Since eclipse uses a polling mechanism to check whether there was any change in the filesystem as a result you might face the performance issue. But do not worry the performance issue occurs only for large workspace.
That's all for today, please mention in the comments in case you have any questions related to the "resource is out of sync with the filesystem error" in eclipse.