Java Tools Tutorials - Herong's Tutorial Notes - Version 5.32, by Dr. Herong Yang
jvisualvm Command to Open Dump Files or Conections
This section describes the Java VisualVM 'jvisualvm' command options. '--openfile', '--openpid' and '--openjmx', allows you to start Java VisualVM and opens a dump file, or a connection to JVM process on the local machine or on a remote machine through JMX.
To learn how to use jvisualvm (Java VisualVM), let's look at it's command line options:
C:\herong>\Progra~1\java\jdk1.8.0\bin\jvisualvm -help The launcher has determined that the parent process has a console and will reuse it for its own console output. Closing the console will result in termination of the running program. Use '--console suppress' to suppress console output. Use '--console new' to create a separate console window. Usage: launcher {options} arguments General options: --help show this help --jdkhome <path> path to JDK -J<jvm_option> pass <jvm_option> to JVM --cp:p <classpath> prepend <classpath> to classpath --cp:a <classpath> append <classpath> to classpath --fork-java run java in separate process --trace <path> path for launcher log (for trouble shooting) --console suppress supppress console output --console new open new console for output Module reload options: --reload /path/to/module.jar install or reinstall a module JAR file Additional module options: --openfile <arg> open file specified by <arg>, file can be Application snapshot, NetBeans Profiler snapshot or HPROF heap dump. --openpid <arg> open application with process id <arg> --openid <arg> open application with id <arg> --openjmx <arg> open application specified by JMX connection (host:port) Core options: --laf <LaF classname> use given LookAndFeel class instead of the default --fontsize <size> set the base font size of the user interface, in points --locale <language[:country[:variant]]> use specified locale --userdir <path> use specified directory to store user settings --cachedir <path> use specified directory to store user cache, must be different from userdir --nosplash do not show the splash screen
The most useful options are "--openfile", "--openpid" and "--openjmx", which allows you to start Java VisualVM and opens a dump file, or a connection to JVM process on the local machine or on a remote machine through JMX.
If you run jvisualvm with no option, it will start Java VisualVM with the default screen with controls to open files and connections later.
Last update: 2015.
Table of Contents
'javac' - The Java Program Compiler
'java' - The Java Program Launcher
'jconsole' - Java Monitoring and Management Console
'jstat' - JVM Statistics Monitoring Tool
►jvisualvm (Java VisualVM) - JVM Visual Tool
What Is jvisualvm (Java VisualVM)?
►jvisualvm Command to Open Dump Files or Conections
Connecting Java VisualVM to a Local JVM Process
Monitoring Usgaes of CPU, Heap, Classes and Threads
Monitoring Thread Status as Timeline
Taking Thread Dump to See Thread Stack Traces
Taking Heap Dump to See Memory Usages
Connecting to Remote JVM Processes
Avaible Plugins and Installation
'javap' - The Java Class File Disassembler
'keytool' - Public Key Certificate Tool