Running Java Programs on JRockit R28.2.7

This section provides a tutorial example on how to compile and run Java programs using JRockit JVM R28.2.7 on Windows systems.

JRockit R28.2.7 has a built-in Java compiler. You can compile and run a Java program with JRockit as shown below:

>\progra~1\java\jrockit-jdk1.6.0_45-R28.2.7-4.1.0\bin\javac Hello.java

>\progra~1\java\jrockit-jdk1.6.0_45-R28.2.7-4.1.0\bin\java Hello
Hello world!

You can also compile a Java program with JDK 1.6 and run it on JRockit R28.2.7, because they are compatible:

>\Progra~1\java\jdk1.6.0_45\bin\javac Hello.java

>\progra~1\java\jrockit-jdk1.6.0_45-R28.2.7-4.1.0\bin\java Hello
Hello world!

But you can not compile a Java program with JDK 1.7 and run it on JRockit R28.2.7, because they are not compatible:

>\Progra~1\java\jdk1.7.0_45\bin\javac Hello.java

>\progra~1\java\jrockit-jdk1.6.0_45-R28.2.7-4.1.0\bin\java Hello
Exception in thread "Main Thread" 
   java.lang.UnsupportedClassVersionError: Hello: 
   unsupported classversion 51.0
 at java.lang.ClassLoader.defineClass1(Native Method)
 at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
 at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
 at java.security.SecureClassLoader.defineClass(SecureClassLoader....
 at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
 at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
 at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
 at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
 at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

Could not find the main class: Hello.  Program will exit.

Last update: 2014.

Table of Contents

 About This Book

 Downloading and Installing JDK 1.8.0 on Windows

 Downloading and Installing JDK 1.7.0 on Windows

 java.lang.Runtime Class - The JVM Instance

 java.lang.System Class - The Operating System

 ClassLoader Class - Class Loaders

 Class Class - Class Reflections

 Sun's JVM - Java HotSpot VM

JRockit JVM 28.2.7 by Oracle Corporation

 What Is JRockit JVM?

 Downloading and Installing JRockit R28.2.7

Running Java Programs on JRockit R28.2.7

 Memory Footprint of JRockit R28.2.7

 What Is JRockit Mission Control?

 Running JRockit Mission Control

 What JRockit Management Console

 JRockit Management Console on HotSpot JVM

 JVM Runtime Data Areas

 Memory Management and Garbage Collectors

 Garbage Collection Tests

 JVM Stack, Frame and Stack Overflow

 Thread Testing Program and Result

 CPU Impact of Multi-Thread Applications

 I/O Impact of Multi-Thread Applications

 CDS (Class Data Sharing)

 Micro Benchmark Runner and JVM Options

 Micro Benchmark Tests on "int" Operations

 Micro Benchmark Tests on "long" Operations

 Micro Benchmark Tests in JIT Compilation Mode

 Micro Benchmark Tests on "float" and "double" Operations

 Outdated Tutorials

 References

 PDF Printing Version