
Java virtual machine - Wikipedia
en.wikipedia.org →"JVM" redirects here. For other uses, see JVM (disambiguation) "JVM (disambiguation)") . A Java virtual machine ( JVM ) is a virtual machine that enables a computer to run Java "Java (software platform)") programs as well as programs written in other languages, other languages referred to as JVM languages that are also compiled to Java bytecode . The JVM is detailed by a specification "Specification (technical standard)") that formally describes what is required in a JVM implementation. Having a specification ensures interoperability of Java programs across different implementations so that program authors using the Java Development Kit (JDK) need not worry about idiosyncrasies of the underlying hardware platform. The JVM reference implementation is developed by the OpenJDK project as open source code and includes a JIT compiler called HotSpot . The commercially supported Java releases available from Oracle are based on the OpenJDK runtime. Eclipse OpenJ9 is another open source JVM for OpenJDK. The Java virtual machine is an abstract (virtual) computer defined by a specification. It is a part of the Java Runtime Environment . The garbage collection "Garbage collection (computer science)") algorithm used and any internal optimization of the Java virtual machine instructions (their translation into machine code ) are not specified. The main reason for this omission is to not unnecessarily constrain implementers. Any Java application can be run only inside some concrete implementation of the abstract specification of the Java virtual machine.[[4]]( Starting with Java Platform, Standard Edition (J2SE) 5.0, changes to the JVM specification have been developed under the Java Community Process as JSR 924.[[5]]( As of 2006[[update]]( , changes to the specification to support changes proposed to the class file format "Class (file format)") (JSR 202)[[6]]( are being done as a maintenance release of JSR 924. The specification for the JVM was published as the blue book ,[[7]]( whose preface states: We intend that this specification should sufficiently document the Java Virtual Machine to make possible compatible clean-room implementations. Oracle provides tests that verify the proper operation of implementations of the Java Virtual Machine. Oracle owns the Java trademark and may allow its use to certify implementation suites as fully compatible with Oracle's specification. The JVM operates on specific types of data as specified in Java Virtual Machine specifications. The data types can be divided[[11]]( into primitive types (integer and floating-point values) and reference "Reference (computer science)") types. long and double types, which are 64-bits , are supported natively, but consume two units of storage in a frame's local variables or operand stack, since each unit is 32 bits. boolean , byte , short , and char types are all sign-extended (except char which is zero-extended ) and operated on as 32-bit integers, the same as int types. The smaller types only have a few type-specific instructions for loading, storing, and type conversion. boolean is operated on as 8-bit byte values, with 0 representing false and 1 representing true . (Although boolean has been treated as a type since The Java Virtual Machine Specification, Second Edition clarified this issue, in compiled and executed code there is little difference between a boolean and a byte except for name mangling in method signatures and the type of Boolean arrays. boolean s in method signatures are mangled as Z while byte s are mangled as B . Boolean arrays carry the type boolean[] but use 8 bits per element, and the JVM has no built-in capability to pack booleans into a bit array , so except for the type they perform and behave the same as byte arrays. In all other uses, the boolean type is effectively unknown to the JVM as all instructions to operate on Booleans are also used to operate on byte s.) The JVM has a garbage-collected heap for storing objects and arrays. Code
Excerpt from a page describing this subject · 40,000 chars · not written by Vinony
via Wikidata · CC0
via Wikidata sitelinks · CC0
Discovered by embedding cosine similarity (sentence-transformers MiniLM, 384-dim).