Creating a self-signing certificate and signing a jar file.
To create a certificate that you can use to self-sign your JAR files, launch the keytool application (must be in your path):
keytool -genkey -alias <YOUR_ALIAS> -keystore <YOUR_KEYSTORE_NAME>.keystore
<YOUR_ALIAS> and <YOUR_KEYSTORE_NAME> can be anything you want, just don't forget them. When you run the tool, it will ask your your name, organization, address, etc., as well as the keystore password. Once you answer those questions, it will create the keystore and certificate for you.
You can then sign a jar as follows:
jarsigner -keystore <YOUR_KEYSTORE_NAME>.keystore -storepass <YOUR_KEYSTORE_PASSWORD> <YOUR_JAR_FILE> <YOUR_ALIAS>
That should do it.
Comments:
Post a Comment:

