File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Java Standards question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Java Standards question" Watch "Java Standards question" New topic

Java Standards question

Robert Upshall

Joined: Aug 23, 2001
Posts: 25
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.
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.
Greg Charles

Joined: Oct 01, 2001
Posts: 2771

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

Joined: Oct 08, 2001
Posts: 2937
.. or you can package thenm in a separate JAR file. Your app can get them from there.
I agree. Here's the link:
subject: Java Standards question
Similar Threads
LDAP using with DirContext
Reading Chapter 10 to Grasp Chapter 1 public, protected, private mechanisms
Re-arrange the Jforum repository for 3?
deployment question
JRE Question