Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between `Eclipse/Project/Clean...` and `Eclipse/Project/Refresh (F5)`?

Tags:

java

eclipse

What's the difference between

"Eclipse/Project/Clean..."

and

"Eclipse/Project/Refresh (F5)"

I often have to "rebuild" my workspace that contains few inter-dependent projects, and I am unsure which is the best way to make a clean start?

like image 824
Danijel Avatar asked Oct 15 '12 13:10

Danijel


3 Answers

As mentioned here

Refresh analyses the source-files to check if any changes were made from outside Eclipse, and if so, compiles files that were changed.

Clean on the other hand removes all compiled classes and forces recompilation of the whole project (or workspace).

like image 67
dsgriffin Avatar answered Oct 16 '22 12:10

dsgriffin


Clean deleted the generated resources like compiled classes and makes sure that latest code base is recompiled again where as

Refresh syncs the eclipse project from the actual folder structure which makes sure that any changes done to files and/or folder structure is available to eclipse...

like image 37
Bharat Sinha Avatar answered Oct 16 '22 13:10

Bharat Sinha


Clean will clean all the compiled files from the selected projects. It will trigger a rebuild if Build Automatically (in the project menu) is enabled.

Refresh will reload the files in the project from the filesystem.

For your question, Clean will be the answer. Make sure that you have Build Automatically checked.

like image 1
Pradeep Pati Avatar answered Oct 16 '22 13:10

Pradeep Pati