文档

Java™ 教程-Java Tutorials 中文版
启动政策工具
Trail: Security Features in Java SE
Lesson: Creating a Policy File
Section: Set up a Policy File to Grant the Required Permission

启动政策工具

To start Policy Tool, simply type the following at the command line:

policytool

This brings up the Policy Tool window.

Whenever Policy Tool is started, it attempts to fill in this window with policy information from the user policy file. The user policy file is named .java.policy by default in your home directory. If Policy Tool cannot find the user policy file, it issues a warning and displays a blank Policy Tool window (a window with headings and buttons but no data in it), as shown in the following figure.

a blank Policy Tool window

You can then proceed to either open an existing policy file or to create a new policy file.

The first time you run the Policy Tool, you will see the blank Policy Tool window, since a user policy file does not yet exist. You can immediately proceed to create a new policy file, as described in the next step.


Previous page: Set up a Policy File to Grant the Required Permission
Next page: Grant the Required Permission