Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to achieve that Eclipse clean and build (aka rebuild)?

I deleted my ./bin folder in an Eclipse Indigo (super similar to Helios), and now I am wondering how to rebuild my Java project. I just cannot find a button like we can see in Netbeans.

like image 626
imacake Avatar asked Jul 23 '11 21:07

imacake


People also ask

How do you do clean and build in Eclipse?

In Project->Clean I select "Clean projects selected below", select my project(s) and check "Start a build immediately" with "Build only selected projects". Then go to Window->Preferences->General->Keys, search "Build clean" and enter my own binding for this command. For example, Ctrl + D .

Why do we need to clean project in Eclipse?

The Clean functionality of Eclipse is broken. If you delete files outside of Eclipse it will not pick up on the fact that the files are now missing, and you'll get build errors until you delete the files manually. Even then, that will not necessarily work either, especially if there are a lot of files missing.


2 Answers

For Eclipse you can find the rebuild option under Project > Clean and then select the project you want to clean up... that's all.

Eclipse Clean projects selected below

This will build your project and create a new bin folder.

like image 132
Abhishek Singh Avatar answered Sep 18 '22 19:09

Abhishek Singh


In Eclipse there is an "Auto Build" option, which is checked by default. When it is checked, you don't need to build your project, this happens automatically. If this behaviour is unwanted, uncheck this option and click build project whenever you want.

To clean a project, select Clean Project. This will delete the bin folder, however if Auto build is checked, it will be immediatelly regenerated.

like image 37
kgiannakakis Avatar answered Sep 18 '22 19:09

kgiannakakis