Skip to content

Instantly share code, notes, and snippets.

@mping
Forked from nicerobot/jstatd.sh
Last active June 14, 2016 11:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mping/f0ae21e36042132d89308c9e621ea1ee to your computer and use it in GitHub Desktop.
Save mping/f0ae21e36042132d89308c9e621ea1ee to your computer and use it in GitHub Desktop.
Run jstatd w/o error 'access denied (java.util.PropertyPermission java.rmi.server.ignoreSubClasses write)'

Socks Proxy

image

Add Remote Host

image

Add Jstad Connection

image

#!/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}
> ssh -D 9696 user@remoteHost.com
> jvisualvm -J-DsocksProxyHost=localhost -J-DsocksProxyPort=9696
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment