Java applet plugin and JavaHelp

I need to include the sun jh.jar (javahelp.jar) with the applet archives so that JavaHelp can work with the plugin. Did that, but signing it or not, it does not work.

When I sign it, it says "jarsigner: unable to sign jar: java.util.zip.ZipException: invalid entry compressed size (expected 10599 but got 10549 bytes)

And not signing the applet gives this error:

The certificate is expired. Do you want to ignore this warning and proceed?

It says that the publisher was verified by "VeriSign", Inc" and gave a java help could not parse exception

So my last choice was to remove all the META-INF files from the jh.jar and sign it myself and it

didn't give any jarsigner errors. When loading in the applet it gives the java help could not parse exception.

Everything else works in the java plugin using my own self sign certificate except for the JavaHelp part.

Anyone had the same problem and knows a work around it?

Thanks

Abraham Khalil

[1023 byte] By [akhalil100] at [2007-9-26 2:29:32]
# 1
Don't worry, figured it out...Didn't put my help set and html files in my package jar, but including the jh.jar in the archive worked.Still had to remove the META_INF files and do the sign on the jar to get it working properly.
akhalil100 at 2007-6-29 9:46:53 > top of Java-index,Security,Signed Applets...
# 2

thanks,

Don

Re: Using DefineClass when loading Jar classes dynamically - 10 Duke points

Author: donmorgan

Feb 1, 2002 7:16 PM

Reply 1 of 2

You could just catch the exception, load the interface, and then try again to load the implementation class .... this

would certainly be a performance hit if you have many classes to load.

Re: Using DefineClass when loading Jar classes dynamically - 10 Duke points

Author: akhalil100

Feb 3, 2002 2:41 AM

Reply 2 of 2

I've found the answer, but your suggested help me debug my problem, so reply to

http://forum.java.sun.com/thread.jsp?forum=63&thread=154572 and I'll give you 5 Duke points for a good attempt.

Define Class is automatically recursive calling the class loader load method again, if can't load the whole class yet. It

was that I stored each jar class entry with its name as .class extension and its class bytes in the start of reading the

whole jar. In load class, I took off the .class extensions but forgot to do that in the start of storing each jar entry class

name with its class bytes.

Cheers

Abraham Khalil

donmorgan at 2007-6-29 9:46:53 > top of Java-index,Security,Signed Applets...
# 3

Hello!!:

I had a similary situation and it works creatting a certificated and certificating with it the jar. In the jar as it's known you must put everything that your program needs. So I recommend you to look at sun code& tutorial how to make correctly a jar and then try using keytool to create the certificated and signed jar, you can find everything in sun. In other case pealse ask me again.

lucky!!!

elCulpable at 2007-6-29 9:46:53 > top of Java-index,Security,Signed Applets...