Glossary · Java

JVM

Java Virtual Machine

Also known as: java virtual machine, hotspot

The runtime that loads compiled Java bytecode (.class files), manages memory with a garbage collector, and JIT-compiles hot code to native machine code.

How Java code runs

flowchart LR
  S["App.java"] -->|javac| B["App.class bytecode"]
  B -->|class loader| J["JVM"]
  J --> I["Interpreter"]
  J --> T["JIT compiler"]
  J --> G["Garbage collector"]

Handy commands

java -version                 # which JVM is on the PATH
java -XX:+PrintFlagsFinal -version | grep -i maxheap
jcmd <pid> GC.heap_info       # heap usage of a running app
jcmd <pid> Thread.print       # thread dump

Good to know

  • Kotlin, Scala, and Groovy also compile to bytecode and run on the JVM.
  • Heap size is set with -Xms (initial) and -Xmx (maximum).

See also

Related technologies

Used in these posts

Java • 78 min read Reader level: Advanced

What you'll learn

  • The real memory and CPU-cache costs of Java collections
  • What type erasure means for generics in practice
  • How lambdas work under the hood with invokedynamic, and what streams cost
  • How to prompt AI assistants and verify their performance claims
Mastering Core Java & Modern Features: Beat AI by Knowing the Cost

Understand the internal mechanics, memory footprints, and CPU cache costs of Collections, Generics, Lambdas, and Streams to write high-performance Java code that outpaces AI assistants.

#java#jvm#performance#collections
Java • 4 min read Reader level: Advanced

What you'll learn

  • Why generics exist and how the type hierarchy works
  • How to use upper and lower bounded wildcards
  • How to apply the PECS principle when designing APIs
  • What type erasure means for your code at runtime
Java Generics Deep Dive: Wildcards, Bounds, and Type Erasure

A comprehensive guide to Java Generics — covering bounded wildcards, PECS principle, type erasure gotchas, and practical patterns for writing reusable, type-safe APIs.

#java#generics#type-safety#jvm