Hi, I have written an applet using Java 1.4. The applet contains multiple .class and .gif files. I jared the files to produce a single .jar file with the manifest. Then I signed that jar file with jarsigner that produced a self-signed jar with the certificate. When I run the applet in IE6 on my computer (Windows XP) it works fine - I got the certificate dialog box popping up and the applet loads normally. My computer does not have a Web server installed so everything happens locally.
As soon as I move the html and signed jar files to the server and try to call it from my PC, the Java console displays the following message:
java.util.zip.ZipException: invalid entry size (expected 1342177310 but got 7728 bytes)
at java.security.AccessController.doPrivileged(Native Method)
etc... it's huge
I have been through the forums, some people have similiar problem while trying to sign their jar, well, mine signs OK, it's just the fact that it doesn't run ... I've tried to kill the manifest and then re-sign the jar. I also tried to jar the files with -0 option - nothing worked. I do appreciate if someone could point me in the right direction.
I have managed to work this one out: UNIX servers don't like jar files FTPed using ASCII. They should should be transferred in binary mode. I have installed an FTP client on my PC, switched to binary mode and re-transferred the jar file and it worked straight away.