keytool -genkey -alias TestApplet - Create a public/private key pair for the specified alias
keytool -selfcert - Create a certificate for the key you created in the previous step
jarsigner nameofyour.jar TestApplet
Links:
1. Creating-a-Trusted-Applet-with-Local-File-System-Access-Rights
2. signed-applet
3. Chapter 10: Signed Applets