Avi Y
Avi Y

Reputation: 2495

How to configure Eclipse not to delete the content of the classes folder on compile?

Today when I compile my java sources the eclipse deletes all the class folder content (also files which are not classes) and recreate all the classes.

This is not good for me, is it possible to configure the eclipse not to delete all the classes folder content but just to run over all the classes instead?

Upvotes: 3

Views: 314

Answers (1)

Joachim Sauer
Joachim Sauer

Reputation: 308031

The classes folder is not a good place to store your resources, it is supposed to be a pure output folder.

If you need non-classes on your classpath, you simply need to put them somewhere on the source path, Eclipse will copy them to the classes directory. This means you can do one of two thngs:

  • Simply mix your resources with your .java files in the same source-path
  • create a separate source-path just for your resources (call it "res" for example) and keep your .java files and your resources separate.

Upvotes: 5

Related Questions