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.
A policy file is an ASCII text file and can be composed via a text editor or the graphical Policy Tool utility demonstrated in this section. The Policy Tool saves you typing and eliminates the need for you to know the required syntax of policy files, thus reducing errors.
This lesson uses the Policy Tool to create a policy file named examplepolicy
, in which you will add a policy entry that grants code from the examples
directory permission to write.
Follow these steps to create and modify your new policy file:
C:\Test
directory, you can store it in another directory. The examples in the lesson
Quick Tour of Controlling Applications assume that you stored it in the ~/test
directory.