The Java Tutorials have been written for JDK 8. Examples and practices described in this page don't take advantage of improvements introduced in later releases and might use technology no longer available.
See Java Language Changes for a summary of updated language features in Java SE 9 and subsequent releases.
See JDK Release Notes for information about new features, enhancements, and removed or deprecated options for all JDK releases.
You now have a signed JAR file sCount.jar
. The runtime system of the code receiver (Ray) will need to authenticate the signature when the Count
application in the signed JAR file tries to read a file and a policy file grants that permission to this signed code.
In order for the runtime system to authenticate the signature, Ray's keystore needs to have the public key corresponding to the private key used to generate the signature. You supply this by sending Ray a copy of the certificate authenticating the public key. Copy that certificate from the keystore examplestore
to a file named Example.cer
via the following:
keytool -export -keystore examplestore -alias signFiles -file Example.cer
You will be prompted for the store password.