在命令行執行jstatd提示以下信息java
Could not create remote object access denied ("java.util.PropertyPermission" "java.rmi.server.ignoreSubClasses" "write") java.security.AccessControlException: access denied ("java.util.PropertyPermissi on" "java.rmi.server.ignoreSubClasses" "write") at java.security.AccessControlContext.checkPermission(AccessControlConte xt.java:472) at java.security.AccessController.checkPermission(AccessController.java: 884) at java.lang.SecurityManager.checkPermission(SecurityManager.java:549) at java.lang.System.setProperty(System.java:792) at sun.tools.jstatd.Jstatd.main(Jstatd.java:139)
能夠建立一個文件,好比D:\tools.policy
,修改tools.policy文件的內容爲命令行
grant codebase "file:${java.home}/../lib/tools.jar" { permission java.security.AllPermission; };
命令行窗口執行jstatd -J-Djava.security.policy=D:\tools.policy
code
jstatd成功啓動server