Simulating and Diagnosing JVM Out-of-Memory Errors in Spring Boot

Reproducing Heap Exhaustion Bootstrap a Spring Boot application and add the web starter dependancy: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> Implement an endpoint that continuously reserves large blocks of memory: import o ...

Posted on Wed, 27 May 2026 22:12:06 +0000 by tomtimms

Understanding Key Garbage Collection Concepts in the JVM

System.gc() Semantics The System.gc() and Runtime.getRuntime().gc() methods serve as requests for garbage collection. By default, invoking these methods explicitly triggers a Full GC that attempts to reclaim memory from both the young and old generations by collecting discarded objects. It's crucial to understand that a call to System.gc() come ...

Posted on Mon, 25 May 2026 19:54:16 +0000 by viveleroi0

Core Enhancements Introduced in Java JDK 17

Oracle releases new feature versions every six months, yet enterprise applications typically prioritize Long Term Support (LTS) builds. The current stable LTS options include versions 11 and 17. Modern frameworks dictate higher baseline requirements; for instance, Spring Framework 6.x mandates Java 17, and Spring Boot 3.0 enforces this as the m ...

Posted on Mon, 25 May 2026 17:04:06 +0000 by Goose87

JVM Memory Architecture and the Program Counter Register

Once the class loading process—comprising loading, verification, preparation, resolution, and initialization—concludes, the execution engine utilizes the runtime data area to process classes. This memory region acts as a critical bridge between storage and the CPU, managing real-time operations for both the operating system and applications. Th ...

Posted on Sat, 23 May 2026 18:00:09 +0000 by myleow

Core Java Concepts and Implementation Details

Classpath Configuration Classpath defines locations where the JVM searches for compiled classes, libraries, and resources during execution. It can be specified via: Command line: java -cp app.jar;libs/* com.sample.MainApp Environment variable: set CLASSPATH=app.jar;libs/* Executable JAR manifest: Class-Path: libs/dep1.jar libs/dep2.jar Tomca ...

Posted on Fri, 22 May 2026 20:41:36 +0000 by (RL)Ian

Java Concurrency Fundamentals and Implementation Details

Thread States in Java The Thread.State enum defines six states from the Java language perspective: NEW: Thread created but not yet started. RUNNABLE: Thread is executing or ready to run. BLOCKED: Thread is waiting for a monitor lock to enter a synchronized block/method. WAITING: Thread is waiting indefinitely for another thread to perform a pa ...

Posted on Thu, 21 May 2026 22:11:38 +0000 by webmazter

Enterprise Java Backend Technical Interview Reference

Microservices Architecture Stack Modern distributed systems leverage Spring Cloud Alibaba ecosystem combined with containerized deployement. Core infrastructure components include Nginx for edge traffic management, Spring Cloud Gateway for centralized authentication and routing, Nacos for service discovery and dynamic configuration, Sentinel fo ...

Posted on Tue, 19 May 2026 01:38:50 +0000 by cody44

Essential Java Concepts: From Bytecode to Enterprise Systems

Java's Architectural Foundations Java revolutionized software development through its platform-agnostic design and robust object-oriented framework. Introduced by Sun Microsystems in 1995, the language's "write once, run anywhere" capability stems from its bytecode execution model powered by the Java Virtual Machine (JVM). This sectio ...

Posted on Mon, 18 May 2026 03:47:33 +0000 by Ardivaba

JVM Initialization and Internal Structure

JVM Startup Sequence Step 1: Execution Entry Point The Java executable launches the JVM process using the java command. This invocation triggers a multi-stage initialization sequence that prepares the runtime environment before executing any user code. Step 2: Configuration Loading The JVM searches for the jvm.cfg file based on the current work ...

Posted on Sun, 17 May 2026 12:01:01 +0000 by ytse

Understanding Java Class Loading and the Parent Delegation Model

The process of loading a class in Java involves three distinct phases: loading, linking, and initialization. These stages are typically executed sequentially by the JVM when a class is first referenced, and together they constitute the complete class loading lifecycle. 1. Loading During this phase, the class loader reads the binary bytecode fro ...

Posted on Sat, 16 May 2026 10:27:57 +0000 by darence