Java, Why won't my applet/jar file sign?(using jarsigner)

Started by
2 comments, last by johnnyBravo 19 years, 2 months ago
Hi, im trying to sign my applet, ive created my "myjarfile.jar" which contains my class "FormFile.class", and I have tested that it works in a html file. Now I'm trying to sign my applet so it can access the users harddrive to save files. But when I try and sign it, I get an error. Heres it is: Creating key, seems to work fine
Quote: C:\j2sdk1.4.2_07\bin>keytool -genkey -alias mykey -keypass password Enter keystore password: password What is your first and last name? [Unknown]: What is the name of your organizational unit? [Unknown]: What is the name of your organization? [Unknown]: What is the name of your City or Locality? [Unknown]: What is the name of your State or Province? [Unknown]: What is the two-letter country code for this unit? [Unknown]: Is CN=Unknown, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=Unknown correct? [no]: yes
Certifying key, seems to work fine
Quote: C:\j2sdk1.4.2_07\bin>keytool -selfcert -alias mykey -keypass password Enter keystore password: password
Assigning the key to the jar file returns with this error, any ideas?
Quote: C:\j2sdk1.4.2_07\bin>jarsigner -keystore C:\Mine\MacquaireUniversity\Forms -storepass password -keypass password myjarfile.jar mykey jarsigner error: java.lang.RuntimeException: keystore load: Invalid keystore format
thanks
Advertisement
Quote:Original post by johnnyBravo
Hi, im trying to sign my applet, ive created my "myjarfile.jar" which contains my class "FormFile.class", and I have tested that it works in a html file.

Now I'm trying to sign my applet so it can access the users harddrive to save files.

But when I try and sign it, I get an error.

Heres it is:

Creating key, seems to work fine
Quote:
C:\j2sdk1.4.2_07\bin>keytool -genkey -alias mykey -keypass password
Enter keystore password: password
What is your first and last name?
[Unknown]:
What is the name of your organizational unit?
[Unknown]:
What is the name of your organization?
[Unknown]:
What is the name of your City or Locality?
[Unknown]:
What is the name of your State or Province?
[Unknown]:
What is the two-letter country code for this unit?
[Unknown]:
Is CN=Unknown, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=Unknown correct?
[no]: yes


Certifying key, seems to work fine
Quote:
C:\j2sdk1.4.2_07\bin>keytool -selfcert -alias mykey -keypass password
Enter keystore password: password


Assigning the key to the jar file returns with this error, any ideas?
Quote:
C:\j2sdk1.4.2_07\bin>jarsigner -keystore C:\Mine\MacquaireUniversity\Forms -storepass password -keypass password myjarfile.jar mykey
jarsigner error: java.lang.RuntimeException: keystore load: Invalid keystore format


thanks



I believe the -keystore location needs to be a URL to a webserver.
Patrick
hmm the javadoc examples use c:\etc

Quote:
jarsigner -keystore C:\working\mystore -storepass myspass
-keypass dukekeypasswd MyJarFile.jar duke


javadocs

...
No one has any idea?

This topic is closed to new replies.

Advertisement