jvm
43 tutorials tagged “jvm”.
- Creating a Javap ToolBuild your own small javap: read the class file header by hand, then use the Class-File API to list fields, methods and bytecode instructions.
- Bytecode Basics in JavaHow JVM bytecode works: frames, local variable slots, the operand stack, instruction families, a loop traced step by step, and the five invoke instructions.
- Class Loaders in JavaClass loaders find and load classes on demand. Learn the bootstrap, platform and application loaders, the parent delegation model, and when classes are loaded.
- Compact Object Headers in Java 25Java 25 can shrink object headers from 12 to 8 bytes with -XX:+UseCompactObjectHeaders. Learn how it works, measure the savings, and when to turn it on.
- Garbage Collection in JavaGarbage collection automatically frees memory of objects the program can no longer reach. Learn what it does, why Java uses it, its costs, and how to watch it.
- Garbage Collectors in JavaCompare the JVM's garbage collectors: Serial, Parallel, G1, ZGC and Shenandoah. Learn how each works, their pauses and throughput, and how to choose one.
- Heap Dumps and Thread DumpsA heap dump captures every object; a thread dump shows what every thread is doing. Learn to take and read both to find leaks, hangs and deadlocks.
- How Garbage Collection WorksLearn how the JVM finds live objects from GC roots, marks and sweeps or copies them, and why heaps are split into young and old generations.
- How Lambdas Are CompiledLambdas don't become anonymous classes. Learn how javac turns them into private methods plus an invokedynamic call, and how LambdaMetafactory links them.
- Javap Tool in Javajavap is the JDK's class file disassembler. Learn its options (-p, -c, -v, -s, -l), how to read descriptors and the constant pool, and what it reveals.