The JVM brand


  • SUN Classic
  • Exact VM
  • HotSpot VM: HotSpot refers to HotSpot code detection technology
  • BEA JRockit :(BEA has been acquired by Oracle) focuses on server applications, one of the fastest JVMS in the world
  • IBM J9
  • Taobao JVM: It has been launched on Taobao and Tmall, replacing Oracle’s official JVM;
  • Graal VM: Oracle released in April 2018 under the slogan Run Programs Faster
  • Anywhere. The most likely alternative to HotSpot

Java code executes the process


Java programs — (compile) –> bytecode files — (explain execution) –> Operating system (Win, Linux, Mac JVM)

Java -p xxx.class View bytecode JPS view the current process


JVM life cycle

  1. Start the

This is done by bootstrap Class Loader to create an initial class that is specified by the virtual machine’s concrete implementation.

  1. perform

A running Java virtual machine has a clear task: execute Java programs; He runs when the program begins and stops when it ends; When a so-called Java program is executed, what is really being executed is a process called the Java Virtual Machine.

  1. exit

An operating System error causes a thread to terminate by calling the Exit method of the Runtime class or the System class, or the HALT method of the Runtime class, and the Java Security Manager allows this exit or HALT operation. The JNI specification describes the Java Virtual machine exit when the Java Virtual machine is loaded or unloaded using the JNI Invocation API


The JVM architecture diagram


JVM full directory

Class loading mechanism 3. Runtime data area [PC register, vm stack, local method stack] 4. Runtime data area [heap] 5. Runtime data area [method area] 6. Temporary absence 7. Runtime data area [instantiated memory layout and access location of objects, direct memory] 8. String constant pool 10. Garbage collection [overview, related algorithms] 11. Garbage collection [related concepts] 12. Common OOM 14. JDK command line tools