# Remote VisualVM ## Start RMI registry $ $JAVA_HOME/bin/rmiregistry -J-Djava.rmi.server.codebase=file:$JAVA_HOME/lib/tools.jar ## Create Policy file for jstatd * Create a file named `jstatd.all.policy` * With the following contents: grant codebase "file:${java.home}/../lib/tools.jar" { permission java.security.AllPermission; }; ## Start jstatd $ $JAVA_HOME/bin/jstatd -J-Djava.security.policy=/home/arun/jstatd.all.policy ## Launch VisualVM on the remote host $ $JAVA_HOME/bin/jvisualvm After VisualVM is launched, select `"Remote" > "Add Remote Host.."` and enter the hostname where `jstatd` is running.