Starting 'jstatd' with a Security Policy File

This section provides a tutorial on how to start the JVM remote monitoring server 'jstatd' with an internal RMI registry and a security policy file.

In this tutorial, we are going to try to start the JVM remote monitoring server, "jstatd".

1. Run the "jstatd" command in a command window:


Could not create remote object
access denied (java.util.PropertyPermission 
   java.rmi.server.ignoreSubClasses write) access denied 
   java.rmi.server.ignoreSubClasses write)

   at java.lang.SecurityManager.checkPermission
   at java.lang.System.setProperty(

The "access denied" error is expected, because "jstatd" requires a security policy file specified with the "" system property, if there is no security manager running on my machine.

2. Create the security policy file, tools.policy, that grants permissions to run "jstatd" and other tools in the tools.jar:

grant codebase "file:${java.home}/../lib/tools.jar" {

3. Run "jstatd" with the security policy file, tools.policy specified to the "" system property:

C:\herong>\Progra~1\java\jdk1.8.0\bin\jstatd -p 1234

"jstatd" is running correctly now. It created an internal RMI registry and waiting at port 1234 for RMI protocol connections from remote machines by JVM monitoring tools. See the next section on how to run "jps" and "jstat" tools from remote machines.

Last update: 2015.

Table of Contents

 About This Book

 Java Tools Terminology

 Installing Java 8 on Windows

 'javac' - The Java Program Compiler

 'java' - The Java Program Launcher

 'jdb' - The Java Debugger

 'jconsole' - Java Monitoring and Management Console

'jstat' - JVM Statistics Monitoring Tool

 'jps' - JVM Process Status Tool

 Listing JVM Processes on the Local Machine with "jps"

 'jstatd' - JVM Remote Monitoring Server

Starting 'jstatd' with a Security Policy File

 Connecting to 'jps' to Remote 'jstatd'

 'jstat' Command Options and Parameters

 Garbage Collection Testing Program

 'jstat -gcutil' - Garbage Collection Statistics

 Accessing Remote JVM Processes with 'jstat'

 JVM Troubleshooting Tools

 jvisualvm (Java VisualVM) - JVM Visual Tool

 'jar' - The JAR File Tool

 'javap' - The Java Class File Disassembler

 'keytool' - Public Key Certificate Tool

 'native2ascii' - Native-to-ASCII Encoding Converter

 Outdated Tutorials


 PDF Printing Version