Skip to content

Instantly share code, notes, and snippets.

@nicerobot
Created November 18, 2011 00:01
Show Gist options
  • Star 47 You must be signed in to star a gist
  • Fork 17 You must be signed in to fork a gist
  • Save nicerobot/1375032 to your computer and use it in GitHub Desktop.
Save nicerobot/1375032 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} &
@dnazario
Copy link

dnazario commented Apr 9, 2013

very nice! simple. elegant.

@gerritjvv
Copy link

very nice!!!

@ramakanaveen
Copy link

Very useful..Thanks

@pm-manoj-danane
Copy link

Cool!

@rockstar2046
Copy link

coooool! 👍

@PHILATSHAKA
Copy link

Hi,
I am trying to runm the following command : grant codebase "file:/opt/java/jdk1.7.0_21/lib/tools.jar" { permission java.security.AllPermission; }; but it produces this error : bash: syntax error near unexpected token `}'
Please help what am I doing wrong here. I want to connect to the weblogic server remotely using visualvm

@qurikuduo
Copy link

WOW!!! COOL MAN!!!! Thanks alot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment