Why use a project in eclipse?

I have been working as a Java developer for just a year and am gradually trying to increase my knowledge to speed up development. One of the habits that I find in myself is to force me to clean from time to time without even knowing if I need it.

I understand that if you use it, your project will be completely rebuilt, however I do not fully understand under what circumstances I would like to use it.

If I understand correctly, most, if not all, changes to the project will be built automatically, so there should only be a rare occasion with this when I actually need to use the project clean.

+3


source to share


2 answers


Cleanup is useful if any external tool changes your output folder. For example, you are using Eclipse, but sometimes you compile with the command line compiler to the same folder. In this case, Eclipse may fail to incrementally build and display errors in the code if they are actually missing.



Another case is working on some bug in the Eclipse compiler. In very rare cases and in specific Eclipse versions / updates, some compilers that need to be recompiled after certain code changes may be overlooked by the compiler. If you were (un) happy enough to have such an occasion, then pure help will help you.

+4


source


This is useful, for example, if you are deleting a class and then forget to remove a reference to it in another class. If you don't clean up the project, your local copy will still work, but what you actually did is that you just broke the assembly.;)



Your local copy of the project will still work because the .class class will still be present. To find such problems, it is usually good to compile the project from scratch on an integration system.

+1


source







All Articles