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

A note on JRockit versioning


The way JRockit is versioned can be a little confusing. There are at least three version numbers of interest for each JRockit release:

  1. The JRockit JVM version.

  2. The JDK version.

  3. The Mission Control version.

One way to obtain the version number of the JVM is to run java –version from the command prompt. This would typically result in something like the following lines being printed to the console:

java version "1.6.0_14"
  Java(TM) SE Runtime Environment (build 1.6.0_14-b08)
  Oracle JRockit(R) (build R28.0.0-582-123273-1.6.0_14-20091029-2121-windows-ia32, compiled mode)

The first version number is the JDK version being bundled with the JVM. This number is in sync with the standard JDK versions, for the JDK shipped with HotSpot. From the example, we can gather that Java 1.6 is supported and that it is bundled with the JDK classes from update 14-b08. If you, for example, are looking to see what JDK class-level security fixes are included in a certain release, this would be the version number to check.

The JRockit version is the version number starting with an 'R'. In the above example this would be R28.0.0. Each version of the JRockit JVM is built for several different JDKs. The R27.6.5, for instance, exists in versions for Java 1.4, 1.5 (5.0) and 1.6 (6.0). With the R28 version of JRockit, the support for Java 1.4 was phased out.

The number following the version number is the build number, and the number after that is the change number from the versioning system. In the example, the build number was 582 and the change number 123273. The two numbers after the change number are the date (in compact ISO 8601 format) and time (CET) the build was made. After that comes the operating system and CPU architecture that the JVM was built for.

The version number for JRockit Mission Control can be gathered by executing jrmc -version or jrmc -version | more from the command line.

Note

On Windows, the JRockit Mission Control launcher (jrmc) is based on the javaw launcher to avoid opening a console window. Console output will not show unless explicitly redirected, for example to more.

The output should look like this:

Oracle JRockit(R) Mission Control(TM) 4.0 (for JRockit R28.0.0)
  java.vm.version = R28.0.0-582-123273-1.6.0_14-20091029-2121-windows-ia32
  build = R28.0.0-582
  chno = 123217
  jrmc.fullversion = 4.0.0
  jrmc.version = 4.0
  jrockit.version = R28.0.0
  year = 2009

The first line tells us what version of Mission Control this is and what version of JRockit it was created for. The java.vm.version line tells us what JVM Mission Control is actually running on. If Mission Control has been launched too "creatively", for example by directly invoking its main class, there may be differences between the JVM information in the two lines. If this is the case, some functionality in JRockit Mission Control, such as automatic local JVM discovery, may be disabled.