Skip to content

Instantly share code, notes, and snippets.

@rockstar2046
Forked from nicerobot/jstatd.sh
Created August 1, 2016 07:26
Show Gist options
  • Save rockstar2046/9fe3ccf2554c1a9399c4f727df54dde3 to your computer and use it in GitHub Desktop.
Save rockstar2046/9fe3ccf2554c1a9399c4f727df54dde3 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