开发者

Where should I store my images?

开发者 https://www.devze.com 2023-02-21 17:44 出处:网络
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 some

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

精彩评论

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