Skip to content

Instantly share code, notes, and snippets.

@mark-jay
Forked from nicerobot/jstatd.sh
Created June 14, 2020 10:52
Show Gist options
  • Select an option

  • Save mark-jay/ec61ea27585de7d09275ef5936461450 to your computer and use it in GitHub Desktop.

Select an option

Save mark-jay/ec61ea27585de7d09275ef5936461450 to your computer and use it in GitHub Desktop.
Run jstatd w/o error 'access denied (java.util.PropertyPermission java.rmi.server.ignoreSubClasses write)'
#!/bin/sh
policy=${HOME}/.jstatd.all.policy
[ -r ${policy} ] || cat >${policy} <<'POLICY'
grant codebase "file:${java.home}/../lib/tools.jar" {
permission java.security.AllPermission;
};
POLICY
jstatd -J-Djava.security.policy=${policy} &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment