title: can't start jstatd with all access policy
body: <p>I'm trying to start jstatd on my server but I keep getting this error:</p>
  
  <pre><code>[ec2-user@ip-204-95-69 bin]$ sudo jstatd -J-Djava.security.policy=/home/ec2-user/logstash-5.2.0/bin/jstatd.all.policy 
  java.security.policy: error adding Entry:
      java.net.MalformedURLException: no protocol: /usr/java/jdk1.8.0_92/lib/tools.jar
  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)
  [ec2-user@ip-204-95-69 bin]$ 
  </code></pre>
  
  <p>I've set my policy file to looks like this:</p>
  
  <pre><code>grant codebase "/usr/java/jdk1.8.0_92/lib/tools.jar" { permission java.security.AllPermission; };
  </code></pre>
  
  <p>what else do I need to set to get it to start? I tried it as <code>sudo</code> as well but that did not work either.</p>
  
  <p>now if I run it with out the <code>-J</code> like this...<code>jstatd -p 9050 -Djava.security.policy=/homejstatd.all.policy -Djava.rmi.server.hostname=ip-address</code></p>
  
  <p>I keep getting this back...</p>
  
  <pre><code>[ec2-user@ip-204-95-69 bin]$ jstatd -p 9050 -Djava.security.policy=/home/ec2-user/logstash-5.2.0/bin/jstatd.all.policy -Djava.rmi.server.hostname=ip-address
  usage: jstatd [-nr] [-p port] [-n rminame]
  </code></pre>