gifs from a jar & Java Plugin

I've a bunch of GIFs in an JAR that load perfectly when running in an application using the JRE. However when I try to run the same with the Java Plugin in Netscape or IE, some of the images show up incorrectly with white patches in 'em. Anyone else see this problem and know how to counter it?

cheers

-Ragu

[342 byte] By [ragude] at [2007-9-26 3:34:15]
# 1

Well, as no one could answer my query, I probed it a bit and found out the reason:

The gif's in the JAR are compressed by the default jar compression algorithm. This caused 'em to be corrupted (as gif's are themselves compressed, you can't compress 'em again safely - violates some basic law I've read about somewhere)

So when adding gifs to the jar I deactivated compression by using

jar u0f x.jar images

That solves the problem.

The jar command ought to be fixed to automatically not compress files with .gif extensions.

cheers

-Ragu

ragude at 2007-6-29 12:03:31 > top of Java-index,Desktop,Deploying...
# 2
how do u get the image from the jar file?
fmgomes at 2007-6-29 12:03:31 > top of Java-index,Desktop,Deploying...
# 3
javax.swing.ImageIcon myImage = new javax.swing.ImageIcon(getClass().getResource("/myimage.gif")));The image has to be in the same package as the class it is calling from.
rgawanka at 2007-6-29 12:03:32 > top of Java-index,Desktop,Deploying...