jarsigner: invalid END header (bad central directory offset)

I signed a jar (which is a standalone application) with:

C:\>jarsigner -keystore myKeystore myJar.jar

I verified it with

C:\>jarsigner -verbose -verify myJar.jar

It was OK.

I updloaded it to my web site via ftp.

When I try to to downlod it via Java Web Start, I get a java.util.zip.ZipException.

If I try to verify it again with jarsigner, I get:

jarsigner: java.util.zip.ZipException: invalid END header (bad central directory offset).

Can anyone tell me where the jar file may have been corrupted ?

Thanks a lot

Norberto

[610 byte] By [NorbertoLocatelliBassia] at [2007-11-26 15:58:04]
# 1

Norberto:

Did you remember to ftp myJar.jar in binary mode? As I recall, ftp assumes things are ASCII files and does funny things to the file if it is actually a binary.

A good way to check this, I would think would calculate the MD5 hash of your signed Jar file just after you have signed it and then again on the other end after you've FTPed it with "md5sum myJar.jar" (or whatever the windows equivalent is, if applicable).

At least that would be where I'd start to look for something that "messed up" your jar file.

Good luck,

John

John_Shotta at 2007-7-8 22:19:04 > top of Java-index,Desktop,Deploying...
# 2

You were right, John.

Thanks a lot.

I hope to help you one day.

> Norberto:

>

> Did you remember to ftp myJar.jar in binary mode? As

> I recall, ftp assumes things are ASCII files and does

> funny things to the file if it is actually a binary.

>

> A good way to check this, I would think would

> calculate the MD5 hash of your signed Jar file just

> after you have signed it and then again on the other

> end after you've FTPed it with "md5sum myJar.jar" (or

> whatever the windows equivalent is, if applicable).

>

> At least that would be where I'd start to look for

> something that "messed up" your jar file.

>

> Good luck,

>

> John

NorbertoLocatelliBassia at 2007-7-8 22:19:04 > top of Java-index,Desktop,Deploying...