Google Answers Logo
View Question
 
Q: Sign Java code (JAR) ( No Answer,   1 Comment )
Question  
Subject: Sign Java code (JAR)
Category: Computers > Programming
Asked by: alexlavr-ga
List Price: $20.00
Posted: 03 Dec 2005 22:39 PST
Expires: 02 Jan 2006 22:39 PST
Question ID: 601168
I have a private and a public key.

The private key is not in my .keystore
and I added the public key to .keystore.

I need to sign a .jar file but because the private key is not in the
.keystore file, I cannot sign it and I get an error message:


jarsigner: Certificate chain not found for: alias.  alias must reference a v
alid KeyStore key entry containing a private key and corresponding public key ce
rtificate chain.


How can I sign the JAR file with my keys?

Thanks!
Answer  
There is no answer at this time.

Comments  
Subject: Re: Sign Java code (JAR)
From: dyoann-ga on 05 Dec 2005 02:24 PST
 
Hi,

type : keytool -keystore .keystore -list -v  and read the name of the alias.

Then, you can sign your jar with the command : 

jarsigner -keystore .keystore -storetype [TYPE] -signedjar
signedJar.jar OriginalJar.jar [ALIAS_NAME]

Hope this help....

Btw, you should read :
http://java.sun.com/docs/books/tutorial/jar/sign/signing.html

Bye,

Yoann

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy