Herong's Tutorial Notes on JVM
Dr. Herong Yang, Version 3.00, 2007

Java HotSpot VM

Part:   1  2 

This chapter explains:

  • Overview
  • Running Java HotSpot Client VM
  • Running Java HotSpot Server VM
  • VM Memory Usages

Overview

Java HotSpot VM is developed by Sun Microsystems. It has key feature called adaptive compiler that application code will be analyzed as it runs to detect performance bottlenecks, or "hot spots". The Java HotSpot VM will then compile those hot spots for a boost in performance.

There are two implementations of the Java HotSport VM:

  • Java HotSpot Client VM
  • Java HotSpot Server VM

The main differences of the two implementations are:

  • The Client VM has been specially tuned to reduce application start-up time and memory footprint, making it particularly well suited for client environments.
  • The Server VM has been specially tuned to maximize peak operating speed. It is intended for running long-running server applications, for which having the fastest possible operating speed is generally more important than having the fastest possible start-up time.

Both implementations of Java HotSpot VM are included inside the J2SDK installation package. The next two sections will explain how to invoke them.

By the way, Java HotSpot VM source code is available at http://www.sun.com/software/communitysource/hotspot/download.html

Running Java HotSpot Client VM

The following notes were taken in 2007.

After installing JDK 6u2, the Java HotSpot Client VM should be available on my machine. To verify this, run the following command in a command window:

C:\>\progra~1\java\jdk1.6.0_02\bin\java -version
java version "1.6.0_02"
Java(TM) SE Runtime Environment (build 1.6.0_02-b06)
Java HotSpot(TM) Client VM (build 1.6.0_02-b06, mixed mode, 
sharing)

The last line of the output tells you that the Java HotSpot Client VM installed ok. And it is the default JVM to run any Java applications by the "java" command.

The following notes were taken in 2004.

I have just downloaded and installed j2sdk1.4.0_02 on my machine, so the Java HotSpot Client VM should be available on my machine. To verify this, run the following command in a command window:

\local\j2sdk1.4.0_02\bin\java -version

Output

java version "1.4.0_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0_02-b02)
Java HotSpot(TM) Client VM (build 1.4.0_02-b02, mixed mode)

The last line of the output tells you that the Java HotSpot Client VM installed ok. And it is the default JVM to run any Java applications by the java command.

(Continued on next part...)

Part:   1  2 

Dr. Herong Yang, updated in 2007
Herong's Tutorial Notes on JVM - Java HotSpot VM