To load images into your application from a jar file:
try {
URL url = FreeArchiver.class.getResource("/images/yourimg.gif");
// the following line is necessary to be able to catch the exception if
// the image does not exist in the resource
url.getFile();
Image img = Toolkit.getDefaultToolkit().getImage(url);
setIconImage(img);
}
catch (Exception e) {
System.err.println("Unable to load image from archive.");
}