This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java Standards question

 
Robert Upshall
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a Swing app that uses .gif files for displaying on icons and such. I was wondering what is the most common location to place these extra files when when packaging.
i.e.
If I have a class com.mycompany.CustomerEntry that uses a file customer_icon.gif, should I place the customer_icon.gif file in /com/mycompany/customer_icon.gif or /com/mycompany/somedir/customer_icon.gif or /customer_icon.gif, etc ......

I know it doesn't mater one way or the other but I was wondering if there was a generally accepted standard as how to do this.
I would welcome any ideas from anybody as to what method they use.
Thanks,
Robert
 
Greg Charles
Sheriff
Posts: 2984
12
Firefox Browser IntelliJ IDE Java Mac Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I haven't seen any kind of standard, but I usually put them in a directory called images which I stick in the application jar. That way I can load them with:
 
John Smith
Ranch Hand
Posts: 2937
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
.. or you can package thenm in a separate JAR file. Your app can get them from there.
Eugene.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic