Search code examples
javavisualvmjvisualvmjstatd

How do I start jstatd in my local machine?


I was trying all the steps mentioned in this link , but unfortunately getting the same old error like

Could not create remote object
access denied ("java.util.PropertyPermission" 
"java.rmi.server.ignoreSubClasses" "write")
java.security.AccessControlException: access denied 
("java.util.PropertyPermission" "java.rmi.server.ignoreSubClasses" 
"write")
at java.security.AccessControlContext.checkPermission(AccessControlContext.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)

Hope someone can point out the error that I'm doing . By the way, this is how my jstatd.all.policy file looks like

bismoy@ap-l0059:~/Downloads/java/bin$ cat jstatd.all.policy 
grant codebase "file:/home/bismoy/Downloads/java/lib/tools.jar" {
permission java.security.AllPermission;
};

enter image description here


Solution

  • Location of jstatd.all.policy file is /home/user as per your command line, but is ~/Downloads/java/bin as per your question. Make sure to use correct paths.