The Java Virtual Machine (JVM) enables a set of computer software programs and data structures to use a virtual machine model for the execution of other computer programs and scripts. Use this tag for questions dealing with tools provided by a JVM or how it works in a specific scenario.
The model used by a JVM accepts a form of computer intermediate language commonly referred to as Java bytecode. This language conceptually represents the instruction set of a stack-oriented, capability architecture.
A JVM can also execute bytecode compiled from programming languages other than Java. For example, Ada source code can be compiled to execute on a JVM. JVMs can also be released by other companies besides Oracle (the developer of Java), but JVMs using the "Java" trademark may be developed by other companies as long as they adhere to the JVM specification SE 7 published by Oracle and to related contractual obligations.
List of Java and JVM Specifications 6-11
See also "Understanding Oracle Java SE Licensing".
Java was conceived with the concept of WORA - write once, run anywhere
. This is done using the Java Virtual Machine (JVM).
The JVM is the environment in which Java programs execute. It is the software that is implemented on non-virtual hardware and on standard operating systems.
JVM is a crucial component of the Java platform, and because JVMs are available for many hardware and software platforms, java can be both middleware and a platform in its own right, hence the trademark write once, run anywhere
. The use of the same bytecode for all platforms allows Java to be described as "compile once, run anywhere", as opposed to "write once, compile anywhere", which describes cross-platform compiled languages. A JVM also enables 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). Appropriate APIs bundled together form the Java Runtime Environment (jre).
Online Resources
- JVM Wikipedia
- A nice online book on the internals of JVM: Inside JVM by Bill Venners
- Java HotSpot VM Options
- IBM JVM Documentation
- OpenJDK Wiki
- Oracle HotSpot Wiki - Has information about JVM internals.
What questions should have this tag?
- Questions to know how a JVM works in a specific scenario
- Questions which deal with tools provided with a JVM