Eclipse resolve “resource is out of sync with the filesystem” permanently

If you are a regular Eclipse user than you might have got this error many times. The error simply says, “you’ve made changes in files in your workspace from outside eclipse”. The simplest solution would be to select the project and press F5 (Right click -> Refresh). This will re-sync any external changes to the file system and eclipse would now know what exactly is in your workspace. But it is cumbersome to do this everytime any of your file changes due to external agent.

The best way would be to let Eclipse automatically handle any external changes in file system. So that when you compile the code it never gives the error “resource is out of sync with the filesystem”.

Do do this, select following option:

Window -> Preferences -> General -> Workspace

Now depending on your version of Eclipse you will get either of following options in workspace window.

  • Refresh Automatically
  • Refresh using native hooks or pooling

Check out the below screen shot for this option.
eclipse-workspace-refresh-automatically

One thing we should highlight here is that Eclipse uses polling mechanism to check whether there was any change in the filesystem. This might have a performance impact. So choose wisely. Frankly I am using this feature for quite sometime now and I don’t see that much of impact.



17 Comments

  • Rashi Coorg 28 June, 2012, 18:25

    Thanx a lot :) It helped me.. I like all ur posts.. It’s very useful.. I am a frequent visitor to ur site.. Thanq so much!

  • Jan 29 June, 2012, 12:16

    Do you have some practice while running an additional compiler like the CoffeeScript oder SASS/Compass Watchdog? We’ve noticed that especially on windows (7), the refreshing won’t work — with the both options enabled. Refreshing on “Refresh” or “on access” works.

  • franjo 11 October, 2012, 2:19

    Thanks man, your site is really helping me a lot with all these tools weird problems.

  • Raul 22 October, 2012, 22:59

    TANKS!!!!

  • rohit 11 December, 2012, 16:13

    thanks this helped

  • Serg 3 February, 2013, 2:43

    thank you very much!!!! you helped me, i didnt know how to resolve it :)

  • Test 21 February, 2013, 13:42

    Thanks Very much !!

  • Muzzamil 26 February, 2013, 10:51

    Hi, thanks man, it worked….

  • naresh 19 March, 2013, 16:36

    thanks viral,it worked

  • Prasanna Balakrishnan 17 April, 2013, 17:22

    Thanks a lot , Very Helpful..you saved me lot of time……

  • adhi 7 May, 2013, 14:52

    good tutorial bro :)

  • Aamir 20 May, 2013, 9:23

    Thanks, it helped me.

  • Usama Ibrahim 3 July, 2013, 17:32

    Thanks, it works

  • francaill 7 November, 2013, 16:08

    Thanks, very helpful

  • Danny 27 May, 2014, 23:27

    Thank you man ;)

  • dhruven 14 June, 2014, 21:56

    good solution. just to add if it does not work even after above solution, please restart the eclipse. That may load the files correctly.

Leave a Reply

Your email address will not be published. Required fields are marked *

Note

To post source code in comment, use [code language] [/code] tag, for example:

  • [code java] Java source code here [/code]
  • [code html] HTML here [/code]

Current ye@r *