Search code examples
javajvmjitjvm-hotspot

Jvm JIT and Hotspot - What are the differences


I've heard these terms being used, but i cant seem to find a top level view of where they fit in all together in a Java framework. I know JIT is a compiling mechanism, but is it part of JVM? Whats a Hotspot? Is it some new type of VM?


Solution

  • JVM is a specification. Different vendors implement the spec. Eg: Sun (now Oracle), IBM, BEA (now Oracle), SAP all implement the specification and provide their own JVMs. Sun's specific implementation is called Hotspot. BEA's is called JRockit.

    JIT is part of the JVM which takes Java bytecodes and compiles it to the native processor assembly code on the machine where the program is running. Each vendor implements the JIT leveraging unique sophisticated algorithms. For eg: JIT on JRockit is different from Hotspot's JIT.