kim.policy

来自「初期JAVA学习非常有用的资料。帮助深入了解API。特别是Applet。」· POLICY 代码 · 共 34 行

POLICY
34
字号
keystore "kim.keystore";// Here is the permission TerrysGame needs.// It grants code signed by "terry" the HighScorePermission, if the// HighScorePermission was signed by "chris"grant SignedBy "terry" {  permission com.scoredev.scores.HighScorePermission      "TerrysGame", signedBy "chris";};// Here is the set of permissions the HighScore class needs:grant SignedBy "chris" {  // The HighScore class needs permission to read "user.home" to find  // the location of the highscore file  permission java.util.PropertyPermission "user.home", "read";  // It needs permission to read and write the high score file itself  permission java.io.FilePermission      "${user.home}${/}.highscore", "read,write";  // It needs to get granted its own permission,  // so it can call checkPermission  // to see if its caller has permission.  // Only grant it the permission  // if the permission itself was signed by "chris"  permission com.scoredev.scores.HighScorePermission       "*", signedBy "chris";};

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?