Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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

This comment has been minimized.

Copy link

commented Apr 9, 2013

very nice! simple. elegant.

@gerritjvv

This comment has been minimized.

Copy link

commented Oct 27, 2014

very nice!!!

@ramakanaveen

This comment has been minimized.

Copy link

commented Jun 19, 2015

Very useful..Thanks

@pm-manoj-danane

This comment has been minimized.

Copy link

commented Aug 12, 2015

Cool!

@rockagen

This comment has been minimized.

Copy link

commented Aug 1, 2016

coooool! 👍

@PHILATSHAKA

This comment has been minimized.

Copy link

commented Jan 31, 2017

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

This comment has been minimized.

Copy link

commented May 30, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.