Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
556 views
in Technique[技术] by (71.8m points)

java - How to prevent Eclipse from cleaning the bin folder for every build?

I am now doing a project using Eclipse, and I have some resource files (e.g., image, text) saved in the bin folder, and these files are needed by the program.

However, with every build, Eclipse would try to clean up the folder, then rebuild the project. When cleaning, it deletes the resource files in the folder. Is there anyway to stop Eclipse from doing this?

I know I could change the location of the files, but I am also curious why Eclipse would do this, and could this be prevented from happening.

Thanks!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Go to Options -> Java-> Compiler -> Building and uncheck Scrub output folders when cleaning projects.

That did the trick for me. In my project, I have an Ant task that adds a few configuration resources to the bin folder to include them in the classpath, without having them in src


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...