开发者

Where should I store my images?

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.


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:

  • adding non-code resources to jar file using Ant


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜