Difference between JVM and HotSpot?
What exactly is HotSpot and how does it relate to JVM and OpenJDK? Is it a library? What exactly does it do?
Also, what is the difference between OpenJDK and HotSpot?
The definition of what exactly is a Java Virtual Machine is stated in the Java Virtual Machine Specification
The JVM is by definition a virtual machine, i. e. a software machine that simulates what a real machine does. Like a real machine, it has an instruction set, a virtual computer architecture and an execution model. It is capable of running code written with this virtual instruction set, pretty much like a real machine can run machine code.
HotSpot is an an implementation of the JVM concept. It was originally developed by Sun and now it is owned by Oracle. There are other implementations of the JVM specification, like JRockit, IBM J9, among many others.
The OpenJDK is a project under which an opensource implementation of HotSpot (and many other pieces of the JDK e.g compiler, APIs, tools, etc) is developed.
OpenJDK (Open Java Development Kit) is a free and open source implementation of the Java Platform, Standard Edition (Java SE).The openjdk is a project started by Sun Microsystems, nowadays care by many companies and the community for build a Java Development Kit absolutely in open source. As per the official documentation.
OpenJDK is an open-source implementation of the Java Platform, Standard Edition (Java SE) specifications. In May 2007, Sun released a fully buildable Java Development Kit (JDK) version for Java SE to the OpenJDK Community as free software under the GNU General Public License version two (GPLv2). Sun announced the Interim Governing Board for the OpenJDK community. Sun also announced that OpenJDK-based implementations can use the Java SE 6 Technical Compatibility Kit (JCK) to establish compatibility with the Java SE 6 specification.
The OpenJDK project consists of a number of components - HotSpot (the virtual machine), the Java Class Library and the javac Java compiler.For more on it, visit its site.
The current JVM provided by Sun/Oracle is called HotSpot because it seeks hot spots of use in the code (places where code is more intensively used) for "just-in-time" optimization. From the wikipedia, HotSpot, released as the "Java HotSpot Performance Engine" is a Java virtual machine for desktops and servers, maintained and distributed by Oracle Corporation.
HotSpot is, as mentioned above, a cross-platform implementation of the Java Virtual Machine (JVM) Concept, and is distributed with the OpenJDK (Java Developer Kit), under the GNU General Public License. HotSpot is written mainly in C++, and was originally developed under Sun Microsystems. It is currently developed under the OpenJDK Project, at www.java.net. The HotSpot JVM was available as an add-on for Java 1.2, and later was used as the default Sun JVM in Java 1.3. The JVM is currently in Version 7, Build b147, and has an active development community behind it.
For more information, goto: https://www.java.net/
JVM is an abstract machine (specifications). HotSpot, OpenJDK and JRockit and so are implementations of JVM.
Free and open source implementations
HotSpot, the primary reference Java VM implementation
OpenJDK — Open Java Development Kit is a free and open source implementation licensed under the GNU General Public License (GNU GPL) with a linking exception.
- JRockit (originally from Appeal Virtual Machines) acquired by Oracle for Linux, Windows and Solaris
HotSpot is an advanced form of C++ hacking, in order to use it you must build against it in order to compile even the simplest of things. Unless you tune compilers and or write them from scratch. HotSpot is basically a way of converting source code into C++ code and then compiling it to native code thus the term jit compiled.