8

I'm developing a Java application, and I don't know where is the best place to store the images in the project folder. Should I make a resources folder at the root, or inside the src folder. Or somewhere else ?

Where should it be so it won't make my Ant builds crash ?

Thanks.

PS : I didn't know if I should post here or on meta. I did it here, but if that's not appropriate, just tell me, i'll know for the next one.

3rgo
  • 3,115
  • 7
  • 31
  • 44

2 Answers2

11

I'd go with project/resources. I.e., have a structure that looks like

+ project
+--- src/        (your source code)
+--- lib/        (your libraries)
+--- bin/        (compiled classes)
+--- resources/  (images etc)
+--- build.xml

Here's a related question:

Community
  • 1
  • 1
aioobe
  • 413,195
  • 112
  • 811
  • 826
  • In addition, you may find it useful to identify the resources folder as a source folder to your IDE. For example, in Eclipse -- Properties; Java Build Path; Source. – Andy Thomas Apr 05 '11 at 14:22
0

A common practice is to create res folder in the root of your project in order to separate resources from the source code. Your ant script is your responcibility, so you just need to fix it to fit your needs.

Vladimir Ivanov
  • 42,730
  • 18
  • 77
  • 103