$ rmiregistry -J-Djava.rmi.server.codebase=file:$JAVA_HOME/lib/tools.jar
-
Create a file named
jstatd.all.policy
-
With the following contents:
grant codebase "file:${java.home}/../lib/tools.jar" { permission java.security.AllPermission; };
$ jstatd -J-Djava.security.policy=/home/arun/jstatd.all.policy &
$ jvisualvm
After VisualVM is launched, select "Remote" > "Add Remote Host.."
and enter the hostname where jstatd
is running.