A Java Virtual Machine (JVM) is a set of computer software programs and data structures which implements a specific virtual machine model, this model accepts a form of computer intermediate language, commonly referred to as Java bytecode, which conceptually represents the instruction set of a stack-oriented, capability architecture. This code is most often generated by Java language compilers, although the JVM can also be targeted by compilers of other languages.
JVMs using the "Java" trademark may be developed by other companies as long as they adhere to the JVM specification published by Sun (and related contractual obligations), the most common and well known JVMs are distributed by Sun, IBM and BEA.
Because JVMs are available for many hardware and software platforms, Java can be both middleware and a platform in its own right, this 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.
The JVM also enables such unique features as Automated Exception Handling which provides 'root-cause' debugging information for every software error (exception) independent of the source code.
Sun retains control over the Java trademark, which it uses to certify implementation suites as fully compatible with Sun's specification.
The Sun Java Platform pattern is described as part of the Java Virtual Machine pattern.