Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Function of Project > Clean in Eclipse

Tags:

eclipse

People also ask

What is Project Clean?

Project Clean is a cleaning solutions manufacturer that provides customers with superior cleaning solutions for retail, commercial and industrial markets.

Why might you run the project clean command?

The clean operation (the Project > Clean command) cleans all build artifacts resulting from a previous build of a project. It's a good way to "start over" so that you know that your build output includes only the most up-to-date files based on your source code.

What does Java clean do?

It's a simple trick that removes all files ending with the extension ". class". When you compile with javac , it will compile all the files again without you having to worry about directory structure either. In case you are on windows you can get the alternative for find here.


It removes whatever already-compiled files are in your project so that you can do a complete fresh rebuild.


Its function depends on the builders that you have in your project (they can choose to interpret clean command however they like) and whether you have auto-build turned on. If auto-build is on, invoking clean is equivalent of a clean build. First artifacts are removed, then a full build is invoked. If auto-build is off, clean will remove the artifacts and stop. You can then invoke build manually later.


There's another problem at work here. 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. This happens to me rather often when I check out a branch of code that has had a lot of changes since the last time I built it. In that case, the only recourse I've found is to start a brand new workspace and reload the project from scratch.