Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jarsigning problem

 
Herbert Kornfeld
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am following the below instructions trying to sign my jar files which access the file system for application that I want to deploy in Webstart - for right now I just need to test and don't need a real key.
So I am following the instructions but a very weird thing is happening - when I finally run the :
jarsigner -keystore myKeystore test.jar myself
command I can see a test.jar.sig file being created on the file system but then when the process finishes the test.jar.sig file is deleted - also some times I notice the bytes of the phantom file are at 0 and other times they are the same as the original file.
I keep repeating the same steps with these inconsistent results and ultimately resulting in ending up with no signed jar files.
Has anyone ever seen something like this or has some advice?
Many Thanks!

Create a new key in a new keystore as follows:
keytool -genkey -keystore myKeystore -alias myself
You will get prompted for a information about the new key, such as password, name, etc. This will create the myKeystore file on disk. A self-signed test certificate also will be created.
Check to make sure that everything is ok. To list the contents of the keystore, use the command:
keytool -list -keystore myKeystore
It should list something like:
Keystore type: jks
Keystore provider: SUN
Your keystore contains 1 entry:
myself, Tue Jan 23 19:29:32 PST 2001, keyEntry,
Certificate fingerprint (MD5):
C2:E9:BF:F9 3 F:4C:8F:3C:5F:22:9E:AF:0B:42:9D
Finally, sign the JAR file with the test certificate as follows:
jarsigner -keystore myKeystore test.jar myself
Repeat this step on all of your JAR files.
 
Herbert Kornfeld
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I figured this out myself.
What I needed to add in my commands was -signedjar newsignedname.jar original.jar
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic