Skip to main content

Bug/workaround with JBuilder 9 and X deployment of apps w/ JavaHelp

No replies
Anonymous

Folks,

There is a bug in the archive builder of JBuilder 9 and X on how
denpendencies like JavaHelp (jh.jar) are packaged into an executable
application jar for deployment purposes.

I have tested the following workaround and I can successfully deploy
JavaHelp in my executable applications. In the event I unsubscribe the
JavaHelp mailing list I can be reached at: fernandr@spawar.navy.mil

In addition to the Gillmer's three steps (below) include the JavaHelp
(jh.jar) in your Project's Required Library and include it as a
dependency in the archive builder setup.

Gillmer J. Derge (TeamB) devised the following explanation and
workaround.

After investigating this further, it's my opinion that this is indeed a
bug, but the good news is I also found a workaround.

The problem has to do with the way signed jars work. It's explained
better at the URL below than I can do myself.

http://java.sun.com/docs/books/tutorial/jar/sign/intro.html#digest

What happens when you pick "Always include ..." for the jh.jar file is
that JBuilder copies the META-INF/SUN_MICR.RSA and META-INF/SUN_MICR.SF
files from jh.all, but it doesn't copy the signatures that are within
the manifest. As a result you end up with what is essentially a half
signed JAR, which naturally gets rejected by the verifier.

The solution is to prevent JBuilder from including those signature
files. Then you have a normal, unsigned JAR instead of a half signed
JAR. The easiest way to do that is to include your own, empty
META-INF/SUN_MICR.RSA and META-INF/SUN_MICR.SF files. JBuilder won't
overwrite them with the ones in jh.jar.

1. Create a META-INF directory in your source directory. Typically
that
means you want to create src/META-INF

2. Create empty SUN_MICR.RSA and SUN_MICR.SF files in that directory.

3. Open the Properties dialog for the Application archive, and on the
"Content" page, add those two files.

********************************************************************************

You may leave the list at any time by sending message with no subject and
"SIGNOFF JAVAHELP-INTEREST" in the body to LISTSERV@JAVA.SUN.COM. Archives
are available at http://archives.java.sun.com/archives/javahelp-interest.html.
Submit bug reports at http://java.sun.com/cgi-bin/bugreport.cgi.