Module  java.management
软件包  java.lang.management

Class ManagementPermission

  • All Implemented Interfaces:
    SerializableGuard


    public final class ManagementPermission
    extends BasicPermission
    当SecurityManager运行的代码调用在Java平台的管理界面中定义的方法时,SecurityManager将检查的权限。

    下表提供了许可允许的简要说明,并讨论了授予代码许可的风险。

    Table shows permission target name, what the permission allows, and associated risks Permission Target Name What the Permission Allows Risks of Allowing this Permission control Ability to control the runtime characteristics of the Java virtual machine, for example, enabling and disabling the verbose output for the class loading or memory system, setting the threshold of a memory pool, and enabling and disabling the thread contention monitoring support. Some actions controlled by this permission can disclose information about the running application, like the -verbose:class flag. This allows an attacker to control the runtime characteristics of the Java virtual machine and cause the system to misbehave. An attacker can also access some information related to the running application. monitor Ability to retrieve runtime information about the Java virtual machine such as thread stack trace, a list of all loaded class names, and input arguments to the Java virtual machine. This allows malicious code to monitor runtime information and uncover vulnerabilities.

    程序员通常不会直接创建ManagementPermission对象。 相反,它们是基于阅读安全策略文件的安全策略代码创建的。

    从以下版本开始:
    1.5
    另请参见:
    BasicPermissionPermissionPermissionsPermissionCollectionSecurityManagerSerialized Form
    • 构造方法详细信息

      • ManagementPermission

        public ManagementPermission​(String name)
        构造具有指定名称的ManagementPermission。
        参数
        name - 权限名称。 必须是“监视器”或“控制”。
        异常
        NullPointerException - 如果 namenull
        IllegalArgumentException - 如果 name为空或无效。