Consultor Eletrônico



Kbase 18969: What are JVM, JRE and JDK?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/15/2008
Solution ID: 18969

GOAL:

What are JVM, JRE and JDK?

FIX:

This KBase is about Java terminology and components. It is intended for the instruction of internal staff only. It is not Progress's responsibility to educate customers on Java, and the information in this document is not intended to be complete.

Some of the Java terms you will run into:

JVM (Java Virtual Machine)
The JVM is the Java process that runs the Java programs (bytecode). It is contained in both the JRE and JDK. It is an interpreter that reads the bytecode and converts it into machine-specific instructions to perform the required tasks. JVMs are built for a specific platform. This enables the Java bytecode to be machine-independent.

JRE (Java Runtime Environment)
The JRE provides a JVM along with libraries and utilities to allow Java programs to run. It is a runtime environment, allowing users to run previously "compiled" programs.

JDK (Java Development Kit)
The JDK allows you to "compile" Java source code. It contains a JVM to run the programs, source code, Java "compiler", libraries and utilities.

Bytecode
A "compiled" Java program. Java is designed to be platform independent. To provide this, Java programs are not compiled into platform-specific executables. Instead, the Java code is compiled into bytecode, which is a platform-independent form of an executable. Because the bytecode has to be interpretted by the JVM, it tends to be slower than compiled programs (such as C programs).

JIT (Just-In-Time Compiler)
Some implementations of Java include a Just-In-Time compiler. This is a platform specific program that converts the java bytecode into executable code for the particular platform. This compiles the bytecode "on-the-fly". The bytecode is typically compiled and made available for the rest of the JVM session. This means subsequent executions of the same Java programs will be faster. There is
typically small performance hit first time through to compile the bytecode.

The following is a Progress analogy of the Java components:

JVM - the Progress client (_progres, prowin32.exe; runs compiled code)
JRE - Client Networking product (run compiled code, cannot compile code)
JDK - 4GL Development product (compile and run code)
Bytecode - r-code (compiled source, but not an executable program)

Progress's use of Java:
This should be covered completely in the Installation Guides, for the products you are installing. For some platforms, you may need to download the JDK or JRE in order to use Progress. This should be indicated in the Installation Guide. Either the JDK or JRE will provide a JVM.