Signing an applet

(from Kevin Cox)

As used in the nyu query-by-humming applet at http://querybyhum2.cs.nyu.edu/

Replace the red text...

First you have to generate a keystore:

$ keytool -genkey -alias signFiles -keystore mystore -keypass thepassword 
-dname "CN=New York University Query by Humming Project,  OU=Computer Science, O=New
York University, L=New York, S=NY, C=US" -storepass thepassword

Then you export a certificate file (it doesn't seem to matter where this is... actually, I wonder if you even need to do it):


$ keytool -export -keystore mystore -storepass thepassword -alias signFiles -file mycertificate.cer

Now you're set up. You can repeatedly use the command below to sign jars:

$ jarsigner -keystore mystore -storepass thepassword -keypass thepassword -signedjar output.jar input.jar signFiles