This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Jar signer Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Jar signer" Watch "Jar signer" New topic
Author

Jar signer

Eoin Mac Aoidh
Ranch Hand

Joined: May 19, 2005
Posts: 48
hi - Jarsigner newbie here;

Im trying to sign a Jar file, on.jar, using the Jarsigner provided by j2sdk1.4.2_04.
...so at the prompt, I type> JarSigner on.jar Eoin
Then it prompts me for the passphrase for the keystore.
I have no idea what the keystore is, or what its passphrase is for that matter! Is there a default passphrase or something?
-Actually on a broader scale - am I going about signing it correctly?

Any help greatly appreciated,
Thanks,
Eoin.
Carl Trusiak
Sheriff

Joined: Jun 13, 2000
Posts: 3340
You need to use the keytool to create a keystore. Example:

Answer the questions ask.

Then, to sign your jar it's:


I Hope This Helps
Carl Trusiak, SCJP2, SCWCD
Eoin Mac Aoidh
Ranch Hand

Joined: May 19, 2005
Posts: 48
Hi Carl, thanks for your help, Im nearly there - there seems to be one problem though.
First I create the keystore:


I just copied your example "jaxb.keys" as Im not sure what this is supposed to be, but it worked fine. Then it prompted me for some indormation, which I filled in.
For the second part then, signing the Jar, the args I gave were:


It gives the following error:
jarsigner: Certificate chain not found for: omframe.html. omframe.html must reference a valid KeyStore key entry containing a private key and corresponding public key certificate chain.


Is the problem with my url "omframe.htm"? -Thats where I want to have the jar displayed.

Sorry to bother you again.
Thanks,

Eoin.
Eoin Mac Aoidh
Ranch Hand

Joined: May 19, 2005
Posts: 48
Ok - Well I dont really know what the problem was - but going by this article;
http://java.sun.com/docs/books/tutorial/deployment/jar/signing.html
I manage to solve the problem.
Thanks again.

E.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Jar signer