Previous Topic

Book Contents

Book Index

Policy Tool Usage

Look for the policytool application in the following directory in Windows File Explorer.

java.home\bin\policytool

Here, java.home is the runtime environment's directory (the JRE directory in the SDK or the top-level directory of the Java 2 Runtime Environment. Typically, it will be

C:\Program Files\Java\j2re1.4.1)

  1. To start Policy Tool, double-click the policy tool application; you see the Policy Tool dialog as shown below:

    Troubleshooting and FAQs_ Figure 3: Policy Tool

  2. Whenever Policy Tool is started, it looks for the default policy file .java.policy in your home directory.
  3. The first time you run the Policy Tool, there will not be a user policy file (unless you created one manually).
  4. To create a new policy file, click New on the File menu. This will close the currently open policy file (if any, after first prompting you to save it if needed) and bring up a new policy tool window, that is, a window with headings and buttons but no data in it.
  5. To add policy entry, click Add Policy Entry on the Policy Tool dialog. You see the following screen.

    Troubleshooting and FAQs_ Figure 4: Policy Entry

  6. CodeBase and SignedBy fields are optional and you need not enter any text in these fields.
  7. To add a new permission, select the Add Permission button in the Policy Entry dialog box. This brings up the Permissions dialog box:

    Troubleshooting and FAQs_Figure 5: Permissions

  8. Choose AllPermission from the Permission drop-down list and then click OK.
  9. Click Done on the Policy Entry dialog.
  10. Now you need to save the entries in a policy file.
  11. Click the Save As command on the File menu. This brings up the Save As dialog box.
  12. Navigate the directory structure to get to the directory in which you want to save the policy file. Type the desired file name, then select the Save button. The policy file is now saved, and its name and path are shown in the Policy File text box.

For more information on Policy Tool, go to the following URL:

http://java.sun.com/products/jdk/1.2/docs/tooldocs/win32/policytool.html

See Also

How to Use Policy Tool to Grant Permissions to Triniti Applications?