test/jdk/sun/security/tools/policytool/UpdatePermissions.html
changeset 47224 e81f9ee4df7f
parent 47223 723486922bfe
child 47225 cebfb13d5759
equal deleted inserted replaced
47223:723486922bfe 47224:e81f9ee4df7f
     1 <html>
       
     2 <body>
       
     3 
       
     4 <applet width=100 height=100 code=UpdatePermissions.class>
       
     5 </applet>
       
     6 
       
     7 This is a multi-stage test.  Click on "done" when you have completed
       
     8 reading these instructions.<br><br>
       
     9 
       
    10 First, policytool will be invoked.<br><br>
       
    11 
       
    12 Then, follow these steps:<br>
       
    13 0) Find (or create) a temporary directory that you have write access to.
       
    14 (Example: 'C:\foo\tmp' on Windows or '/tmp' on other systems)<br><br>
       
    15 
       
    16 1) Click on the "Add Policy Entry" button in the
       
    17 main policytool window.<br><br>
       
    18 
       
    19 2) Click on the "Add Permission" button in the Policy Entry window.<br><br>
       
    20 
       
    21 3) In the Permission window, pull down the "Permission" menu and
       
    22 select "AWTPermission".<br><br>
       
    23 
       
    24 4) In the Permission window, pull down the "Target Name" menu and
       
    25 select "listenToAllAWTEvents".<br><br>
       
    26 
       
    27 5) Click on the "OK" button in the Permission window.<br><br>
       
    28 
       
    29 6) Click on the "Done" button in the Policy Entry window.<br><br>
       
    30 
       
    31 7) In the main policytool window, pull down the "File" menu and
       
    32 select "Save As".<br><br>
       
    33 
       
    34 8) In the SaveAs window, enter "/tmp/ptool.test" as the file name
       
    35 and save it. If the file already exists, just replace it.<br>
       
    36 (Or use the temporary directory mentioned in Step 0 if it's not '/tmp'.
       
    37 For example, "C:\foo\tmp\ptool.test" on Windows)<br><br>
       
    38 
       
    39 9) Check the content of the file created in the previous step<br><br>
       
    40 
       
    41 10) check to make sure that the new entry is in the policy file.<br><br>
       
    42 
       
    43 11) repeat steps 1-10 for:<br>
       
    44 	AWTPermission:		readDisplayPixels<br>
       
    45 	NetPermission:		specifyStreamHandler<br>
       
    46 	RuntimePermission:	setContextClassLoader,
       
    47 				setSecurityManager,
       
    48 				shutdownHooks,
       
    49 				stopThread<br>
       
    50 	SecurityPermission:	createAccessControlContext<br><br>
       
    51 
       
    52 In the confirmation dialog pop-up, click "OK".<br><br>
       
    53 
       
    54 Exit policytool. Delete the files created during this test. If the
       
    55 temporary directory is also newly created, empty and delete it.<br><br>
       
    56 
       
    57 Press "Pass" if ... press "Fail" otherwise.<br><br>
       
    58 
       
    59 </body>
       
    60 </html>