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.
Next, you will use the Policy Tool to create a policy file named exampleraypolicy
and in it grant a permission to code from a signed JAR file.
The JAR file must have been signed using the private key corresponding to the public key imported into Ray's keystore (exampleraystore
) in the previous step. The certificate containing the public key is aliased by susan
in the keystore. We will grant such code permission to read any file in the C:\TestData\
directory.
The steps are: