Jaring causes an error...

Hi all. I have a working SWT application. However when I jar the application and run the jar I recieve an error. The error is caused because the program fails to find an image which is packaged inside the jar.

Specifically when the ApplicationWindow image is being set....

ApplicationWindow.setDefaultImage(new Image(null,"icons/glogo.gif"));

...results in an SWTException caused by a FileNotFoundException "icons/glogo.gif".

The directory structure inside the jar (of the relevant items) is...

#bin

++GUI.java

#icons

++glogo.gif

replacing icons/glogo.gif with ./icons/glogo,gif also works when program is run using the class files, but fails when run via the jar.

How should files/items be referenced inside a jar?

Any advice would be much appreciated thanks.

[836 byte] By [JDeva] at [2007-10-2 11:25:34]
# 1
This has nothing at all to do with either OO or design patterns. Please post in a more sensible forum.- Saish
Saisha at 2007-7-13 4:37:41 > top of Java-index,Other Topics,Patterns & OO Design...
# 2
My apologies, I momentarily lost my bearings. :-)
JDeva at 2007-7-13 4:37:41 > top of Java-index,Other Topics,Patterns & OO Design...