Book Image

Oracle JRockit: The Definitive Guide

Book Image

Oracle JRockit: The Definitive Guide

Overview of this book

Oracle JRockit is one of the industry’s highest performing Java Virtual Machines. Java developers are always on the lookout for better ways to analyze application behavior and gain performance. As we all know, this is not as easy as it looks. Welcome to JRockit: The Definitive Guide.This book helps you gain in-depth knowledge of Java from the JVM’s point of view. We will explain how to write code that works well with the JVM to gain performance and scalability. Starting with the inner workings of the JRockit JVM and finishing with a thorough walkthrough of the tools in the JRockit Mission Control suite, this book is for anyone who wants to know more about how the JVM executes your Java application and how to profile for better performance.
Table of Contents (23 chapters)
Oracle JRockit
Credits
Foreword
About the Authors
Acknowledgement
About the Reviewers
Preface
12
Using the JRockit Management APIs
Bibliography
Glossary
AST
CAS
HIR
IR
JFR
JMX
JRA
JSR
LIR
MD5
MIR
PDE
RCP
SWT
TLA
Index

Introduction


Sometimes a command-line utility is exactly the right tool for the job. You may want to send commands to JVMs in batch scripts, or you may be operating in a very secure environment and only have a command line at your disposal through SSH. Whatever the reason, JRCMD is a small and powerful tool for sending commands to locally running instances of the JRockit JVM from the command line.

The basic usage pattern is to first execute JRCMD with no arguments to list the JVMs currently running on the system. The JVMs will be listed by operating system Process ID (PID) followed by the class name of the main class of the Java application running in the JVM.

For example:

C:\>JROCKIT_HOME\bin\jrcmd
2416 com.jrockit.mc.rcp.start.MCMain
19344 jrockit.tools.jrcmd.JrCmd

In the previous example, there were two JVM instances running when JRCMD was executed—an instance running JRockit Mission Control and, as JRCMD is a Java application too, the JVM running JRCMD itself.

The JRockit instance...