Java Virtual Machine - Overview

Overview

A Java virtual machine is a program which executes certain other programs, namely those containing Java bytecode instructions. JVMs are most often implemented to run on an existing operating system, but can also be implemented to run directly on hardware. A JVM provides an environment in which Java bytecode can be executed, enabling such features as automated exception handling, which provides root-cause debugging information for every software error (exception), independent of the source code. A JVM is distributed along with a set of standard class libraries that implement the Java application programming interface (API). These libraries, bundled together with the JVM, form the Java Runtime Environment (JRE).

JVMs are available for many hardware and software platforms. The use of the same bytecode for all JVMs on all platforms allows Java to be described as a write once, run anywhere programming language, versus write once, compile anywhere, which describes cross-platform compiled languages. Thus, the JVM is a crucial component of the Java platform.

Java bytecode is an intermediate language which is typically compiled from Java, but it can also be compiled from other programming languages. For example, Ada source code can be compiled to Java bytecode and executed on a JVM.

Oracle, the owner of Java, produces a JVM, but JVMs using the Java trademark may be developed by other companies as long as they adhere to the JVM specification published by Oracle and to related contractual obligations.

The Oracle JVM, named HotSpot, is written in the C++ language.

Read more about this topic:  Java Virtual Machine