Tagged articles
116 articles
Page 1 of 2
Tech Freedom Circle
Tech Freedom Circle
Dec 20, 2025 · Backend Development

How SpringBoot Loads Classes: Deep Dive into ClassLoaders and Bean Creation

This article dissects the SpringBoot class‑loading mechanism, explaining how the JVM parent‑delegation model is selectively overridden with custom class loaders like LaunchedURLClassLoader and RestartClassLoader, and how these changes integrate with Spring's bean lifecycle, auto‑configuration, and practical troubleshooting techniques.

DevToolsJavaSpringBoot
0 likes · 37 min read
How SpringBoot Loads Classes: Deep Dive into ClassLoaders and Bean Creation
Architect
Architect
Dec 9, 2025 · Backend Development

Master Java SPI: Build a Pluggable Authentication System with Maven Multi‑Module

This guide explains Java's Service Provider Interface (SPI), contrasts it with traditional APIs, and walks through creating a multi‑module Maven project that uses SPI, a custom class loader, and external JAR loading to implement a flexible authentication plugin in a Spring Boot application.

JavaSPISpring Boot
0 likes · 15 min read
Master Java SPI: Build a Pluggable Authentication System with Maven Multi‑Module
Top Architect
Top Architect
Sep 28, 2025 · Information Security

How to Harden Java Applications Against Decompilation: Techniques and Tools

This article explains why Java bytecode is vulnerable to decompilation and presents a comprehensive set of protection methods—including isolation, class encryption, native code conversion, and various obfuscation techniques—illustrated with diagrams and a real‑world case study.

Obfuscationclassloadercode protection
0 likes · 12 min read
How to Harden Java Applications Against Decompilation: Techniques and Tools
IT Services Circle
IT Services Circle
Sep 7, 2025 · Backend Development

Master Java Backend Interview: JVM, ClassLoaders, AOP, and More

This article guides job seekers through the autumn recruitment season, highlights bank hiring timelines and English requirements, and then provides a comprehensive Java interview Q&A covering JVM memory structures, object allocation failures, the parent‑delegation model, message‑queue usage, Spring AOP principles, and database string type differences.

JVMJavaMessage Queue
0 likes · 17 min read
Master Java Backend Interview: JVM, ClassLoaders, AOP, and More
Architecture Digest
Architecture Digest
Sep 3, 2025 · Backend Development

How to Dynamically Load External JARs into Spring Boot at Runtime

This article explains a step‑by‑step approach to load external JAR files into the JVM, configure Spring Boot to recognize the new classes, and choose among classpath expansion, Spring Boot's loader.path, or a custom ClassLoader, complete with Maven settings and code examples.

Dynamic LoadingJVMclassloader
0 likes · 8 min read
How to Dynamically Load External JARs into Spring Boot at Runtime
Java Captain
Java Captain
Jul 4, 2025 · Backend Development

How to Load External JARs into Spring Boot: Simple 2‑Step Solutions

This guide explains two straightforward steps to load external JAR files into the JVM and make Spring Boot scan them, covering three implementation options—extending the classpath, using Spring Boot’s loader.path parameter, and creating a custom classloader—along with configuration details, Maven settings, and runtime considerations.

JavaSpring Bootclassloader
0 likes · 9 min read
How to Load External JARs into Spring Boot: Simple 2‑Step Solutions
Java One
Java One
May 4, 2025 · Fundamentals

How Does Java Execution Differ from C? A 3‑Minute JVM Deep Dive

This article compares the compilation and runtime processes of C and Java programs, explains Java's class loading, linking, initialization, memory layout, execution engine components, and native interface, and highlights why Java startup is slower than native C execution.

CompilationJVMJava
0 likes · 16 min read
How Does Java Execution Differ from C? A 3‑Minute JVM Deep Dive
Java Captain
Java Captain
Apr 21, 2025 · Backend Development

Understanding Java Annotations and Reflection: Built‑in Annotations, Meta‑annotations, Custom Annotations, Class Loading and Runtime Reflection

This article explains Java annotations—including built‑in, meta‑ and custom annotations—covers how they are used in Spring, describes the Java reflection mechanism, class loading process, ways to obtain Class objects, and demonstrates retrieving generic and annotation information at runtime with code examples.

JavaMeta-AnnotationReflection
0 likes · 15 min read
Understanding Java Annotations and Reflection: Built‑in Annotations, Meta‑annotations, Custom Annotations, Class Loading and Runtime Reflection
FunTester
FunTester
Apr 6, 2025 · Backend Development

Understanding Java ClassLoader: Common Issues, Root Causes, and Solutions

This article explains Java's dynamic ClassLoader mechanism, outlines the hierarchy of built‑in loaders, details frequent problems such as ClassNotFoundException, NoClassDefFoundError, ClassCastException and version conflicts, and provides practical troubleshooting steps and best‑practice recommendations for reliable class loading.

CustomClassLoaderDebuggingJVM
0 likes · 10 min read
Understanding Java ClassLoader: Common Issues, Root Causes, and Solutions
Cognitive Technology Team
Cognitive Technology Team
Apr 5, 2025 · Fundamentals

Understanding Java ClassLoader.loadClass() API and Its Performance Impact

This article explains how the java.lang.ClassLoader#loadClass() API works, why frequent concurrent calls can cause thread blocking due to internal synchronization, demonstrates the issue with a sample multithreaded program, analyzes thread‑dump data, and provides practical solutions to mitigate the performance problem.

JVMJavaThreadBlocking
0 likes · 12 min read
Understanding Java ClassLoader.loadClass() API and Its Performance Impact
FunTester
FunTester
Mar 5, 2025 · Backend Development

Calling Third‑Party Java Methods with Byteman in Chaos Mesh

This article demonstrates how to use Byteman’s DO execution module on the Chaos Mesh platform to invoke static or instance methods of external Java classes without modifying the original code, covering reflection, ClassLoader tricks, and a complete BTM rule example.

BytemanChaos MeshFault Injection
0 likes · 7 min read
Calling Third‑Party Java Methods with Byteman in Chaos Mesh
Selected Java Interview Questions
Selected Java Interview Questions
Feb 20, 2025 · Backend Development

Loading External JARs into Spring Boot: Four Practical Approaches

This article explains how to make custom classes visible to Spring Boot by loading external JAR files through four methods—extending the classpath, using Spring Boot's loader.path parameter, creating a custom ClassLoader, and modifying the boot classpath—while also showing how to configure scanning and packaging details.

Backend DevelopmentJavaSpring Boot
0 likes · 8 min read
Loading External JARs into Spring Boot: Four Practical Approaches
Xuanwu Backend Tech Stack
Xuanwu Backend Tech Stack
Feb 7, 2025 · Fundamentals

Mastering Java Class Loaders: Break and Follow the Parent Delegation Model

This article explains how to create custom Java class loaders by extending java.lang.ClassLoader, when to override findClass versus loadClass, demonstrates both adhering to and breaking the parent delegation model with complete code examples, and discusses common scenarios such as web servers, SPI, and hot deployment where the delegation mechanism is intentionally altered.

Backend DevelopmentCustom Class LoaderJVM
0 likes · 11 min read
Mastering Java Class Loaders: Break and Follow the Parent Delegation Model
Xuanwu Backend Tech Stack
Xuanwu Backend Tech Stack
Feb 4, 2025 · Backend Development

When to Use Class.forName vs. ClassLoader in Java? A Deep Dive

This article explains Java's reflection mechanisms, comparing Class.forName and ClassLoader as two primary ways to load classes, detailing their behavior, static initialization effects, code examples, and practical scenarios such as loading JDBC drivers versus custom dynamic loading.

Class.forNameDynamic LoadingJDBC driver
0 likes · 6 min read
When to Use Class.forName vs. ClassLoader in Java? A Deep Dive
Selected Java Interview Questions
Selected Java Interview Questions
Jan 12, 2025 · Information Security

Encrypting and Dynamically Decrypting Spring Boot JAR Files for Secure Deployment

This article demonstrates a practical approach to protect sensitive Spring Boot applications by encrypting the JAR with AES, storing the key in a secure vault, and using a custom ClassLoader to decrypt and load classes at runtime, while highlighting key management, performance, and additional hardening considerations.

AESJAR encryptionJava
0 likes · 8 min read
Encrypting and Dynamically Decrypting Spring Boot JAR Files for Secure Deployment
Alibaba Cloud Developer
Alibaba Cloud Developer
Dec 3, 2024 · Fundamentals

Unraveling Java’s ClassLoader: From Parent Delegation to Custom Loading

This article explores Java's class loading mechanism in depth, covering when and how classes are loaded, the parent‑delegation model, the internal role of ClassFileParser and InstanceKlass, parallel loading nuances, and practical ways to break or extend the delegation chain with custom class loaders.

CustomClassLoaderInstanceKlassJVM
0 likes · 17 min read
Unraveling Java’s ClassLoader: From Parent Delegation to Custom Loading
Java Architect Essentials
Java Architect Essentials
Dec 2, 2024 · Backend Development

Dynamic Loading of JAR Files in Spring Boot Applications

This article provides a comprehensive guide on dynamically loading JAR packages in Spring Boot, covering core concepts, benefits, and step‑by‑step implementations using SpringBootClassLoader and third‑party OSGi libraries, complete with practical code examples.

Backend DevelopmentDynamic JAR LoadingJava
0 likes · 8 min read
Dynamic Loading of JAR Files in Spring Boot Applications
macrozheng
macrozheng
Oct 25, 2024 · Fundamentals

Why and How Java Breaks the Parent Delegation Model: Real-World Scenarios

This article explains the purpose of Java's parent‑delegation class‑loading mechanism, describes its three built‑in loaders, shows how custom loaders can override it, and explores common situations—such as JNDI, JDBC, Tomcat, and OSGi—where developers intentionally break the delegation for flexibility and modularity.

Custom ClassLoaderJDBCJNDI
0 likes · 11 min read
Why and How Java Breaks the Parent Delegation Model: Real-World Scenarios
Java Tech Enthusiast
Java Tech Enthusiast
Oct 6, 2024 · Backend Development

Dynamic Class Loading and Unloading for Data Governance Tasks in Spring Boot with XXL‑Job

By implementing a plug‑in architecture that uses a custom URLClassLoader to load and unload JAR‑packaged governance tasks at runtime, the Spring Boot application can dynamically register Spring beans and XXL‑Job handlers, remove them cleanly, update configuration via YAML or Nacos, and package the solution with Maven Shade without restarting services.

Dynamic LoadingJavaSpring Boot
0 likes · 21 min read
Dynamic Class Loading and Unloading for Data Governance Tasks in Spring Boot with XXL‑Job
DaTaobao Tech
DaTaobao Tech
Sep 23, 2024 · Backend Development

Root Cause Analysis of Missing Logs after Tomcat 7→8 Upgrade

After upgrading from Tomcat 7 to Tomcat 8, the application’s mixed log4j‑1.4 and logback‑1.2.3 dependencies caused the SLF4J binder to be loaded nondeterministically, so Tomcat 8 sometimes selected the Log4j binder without a configuration file, resulting in completely missing log output; removing the conflicting jars or enforcing a deterministic class‑loading order restored logging.

DebuggingJavaTomcat
0 likes · 19 min read
Root Cause Analysis of Missing Logs after Tomcat 7→8 Upgrade
Top Architecture Tech Stack
Top Architecture Tech Stack
Aug 27, 2024 · Backend Development

Understanding Java's Parent Delegation Model for Class Loaders

The article explains Java's parent delegation model for class loaders, its benefits for stability and security, how to break it by customizing loadClass or using thread‑context class loaders, and illustrates common scenarios such as JNDI, JDBC and Tomcat's own class‑loader hierarchy.

JVMJavaParent Delegation
0 likes · 10 min read
Understanding Java's Parent Delegation Model for Class Loaders
Su San Talks Tech
Su San Talks Tech
Jun 24, 2024 · Fundamentals

How to Break Java’s Parent Delegation Mechanism and Why It Matters

This article explains the purpose of Java's parent delegation class‑loader mechanism, describes its three built‑in loaders, and details common scenarios—such as JNDI, JDBC, Tomcat, and OSGi—where developers intentionally break the delegation to achieve flexibility and isolation.

Custom ClassLoaderJDBCJava
0 likes · 10 min read
How to Break Java’s Parent Delegation Mechanism and Why It Matters
Top Architect
Top Architect
Jun 11, 2024 · Backend Development

Dynamic Class Loading, Registration, and Unloading for Data Governance Tasks in a Spring‑XXL‑Job Service

This article explains how to design a plug‑in architecture for a data‑governance service by using a custom URLClassLoader, Spring bean registration, and XXL‑Job integration to dynamically load, start, stop, upgrade, and unload individual governance tasks without restarting the whole service, and also shows how to persist the configuration in local YAML or Nacos.

DynamicLoadingJavaMicroservices
0 likes · 22 min read
Dynamic Class Loading, Registration, and Unloading for Data Governance Tasks in a Spring‑XXL‑Job Service
Code Ape Tech Column
Code Ape Tech Column
May 30, 2024 · Backend Development

Dynamic Loading of JAR Files in Spring Boot Applications

This article explains the concepts and step-by-step implementation of dynamically loading JAR packages in Spring Boot applications, covering built‑in classloader usage, creating JARs, and leveraging third‑party libraries to enhance flexibility and extensibility.

BackendDynamic LoadingJAR
0 likes · 9 min read
Dynamic Loading of JAR Files in Spring Boot Applications
JD Tech
JD Tech
May 14, 2024 · Backend Development

Matrix Underlying Support Framework: Hot Deployment, Front‑Middle Isolation, and Business Identity Design

This article examines the Matrix middle‑platform framework used at JD.com, detailing its hot‑deployment mechanism, the push‑and‑pull integration chains, class‑loader isolation based on the parent‑delegation model, and the design of business‑identity recognition, while offering best‑practice recommendations and code examples.

Hot DeploymentJavaMicroservices
0 likes · 33 min read
Matrix Underlying Support Framework: Hot Deployment, Front‑Middle Isolation, and Business Identity Design
Architect
Architect
Apr 14, 2024 · Backend Development

How to Dynamically Load and Unload Java Governance Tasks with Custom ClassLoaders and XXL‑Job

This article explains how to design a plug‑in architecture for a data‑governance service that can start, stop, add, or upgrade individual tasks at runtime without restarting the whole service, using a custom URLClassLoader, Spring bean registration, XXL‑Job integration, dynamic configuration updates, and a clean unload process.

Dynamic LoadingJavaMicroservices
0 likes · 26 min read
How to Dynamically Load and Unload Java Governance Tasks with Custom ClassLoaders and XXL‑Job
JD Retail Technology
JD Retail Technology
Mar 22, 2024 · Backend Development

Analysis of JD's Middle‑Platform Evolution and the Underlying Matrix Technical Framework

This article examines JD's practical implementation of middle‑platform (中台) evolution, detailing the design rationale, the Matrix support framework, hot‑deployment mechanisms, class‑loader isolation, and business‑identity principles to illustrate how the architecture improves delivery speed and modularity.

Hot DeploymentJavaPaaS
0 likes · 32 min read
Analysis of JD's Middle‑Platform Evolution and the Underlying Matrix Technical Framework
37 Interactive Technology Team
37 Interactive Technology Team
Mar 4, 2024 · Mobile Development

Android Plugin Architecture Overview and Implementation Guide

This guide explains Android pluginization, showing how a host app can dynamically load separate APK modules—including native libraries, classes via a custom DexClassLoader, and mixed resources—while supporting hot updates, modular isolation, and reduced initial size, and details each loading step and manager implementation.

AndroidDynamic LoadingMobile Development
0 likes · 31 min read
Android Plugin Architecture Overview and Implementation Guide
Amap Tech
Amap Tech
Feb 28, 2024 · Mobile Development

Deep Dive into Android ClassLoader and findLoadedClass Mechanism for Code Coverage

The article details a high‑performance, high‑stability Android code‑coverage technique that creates a surrogate ClassLoader, copies the target PathClassLoader’s private classTable pointer, and invokes findLoadedClass on this loader to query a class’s load state without triggering Android’s native optimization that would otherwise automatically load the class.

AndroidReflectionRuntime
0 likes · 13 min read
Deep Dive into Android ClassLoader and findLoadedClass Mechanism for Code Coverage
Java Tech Enthusiast
Java Tech Enthusiast
Feb 12, 2024 · Backend Development

Dynamic Loading and Unloading of Java Governance Tasks with Custom ClassLoader and XXL‑Job Integration

The solution introduces a plug‑in architecture that uses a custom URLClassLoader to load governance task JARs at runtime, registers their Spring beans and @XxlJob handlers with XXL‑Job, and provides unload logic to deregister jobs, destroy beans, and update configuration via YAML or Nacos without restarting the service.

Dynamic LoadingJavaNacos
0 likes · 21 min read
Dynamic Loading and Unloading of Java Governance Tasks with Custom ClassLoader and XXL‑Job Integration
Su San Talks Tech
Su San Talks Tech
Aug 6, 2023 · Backend Development

Why Adding Fastjson to a SpringBoot Agent Breaks Class Loading

A Java developer added fastjson to a SkyWalking agent for JSON conversion, causing class‑loading conflicts in a SpringBoot 2 application; the article analyzes the root cause, demonstrates debugging steps, explains the parent‑delegation mechanism, and presents solutions using Maven shade relocation or switching to Gson, with practical lessons for avoiding similar issues.

Dependency ConflictGsonJava
0 likes · 14 min read
Why Adding Fastjson to a SpringBoot Agent Breaks Class Loading
Xiao Lou's Tech Notes
Xiao Lou's Tech Notes
Aug 2, 2023 · Backend Development

Why Fastjson Breaks SpringBoot Agents and How to Resolve the ClassLoader Conflict

This article analyzes how adding Fastjson to a SpringBoot agent causes classloader conflicts that prevent GenericHttpMessageConverter from loading, explains the underlying parent‑delegation mechanism, and presents solutions such as using Maven Shade to rename packages or switching to a lightweight JSON library like Gson.

Dependency ConflictGsonJava
0 likes · 16 min read
Why Fastjson Breaks SpringBoot Agents and How to Resolve the ClassLoader Conflict
Architect
Architect
Jul 21, 2023 · Fundamentals

JVM Basics, Class Loading, Runtime Data Areas, Garbage Collection and Tuning Guide

This article provides a concise yet comprehensive overview of the Java Virtual Machine, covering its core components, how Java source files are compiled and executed, class‑loader mechanisms, runtime memory areas, garbage‑collection algorithms, and practical JVM tuning parameters for optimal performance.

Garbage CollectionJVMJava
0 likes · 31 min read
JVM Basics, Class Loading, Runtime Data Areas, Garbage Collection and Tuning Guide
政采云技术
政采云技术
Jul 13, 2023 · Backend Development

Practical Use of Java Dynamic Compilation in Projects

This article explains how Java's dynamic compilation can be applied to modularize and simplify code management in large projects, demonstrates a basic implementation with code examples, and shows how to integrate the technique into Spring Boot applications while addressing class‑loader and dependency challenges.

Dynamic CompilationJavaJavaCompiler
0 likes · 16 min read
Practical Use of Java Dynamic Compilation in Projects
Xiao Lou's Tech Notes
Xiao Lou's Tech Notes
Jun 26, 2023 · Backend Development

Why SkyWalking’s ThreadPool Plugin Failed and How I Fixed It

This article explains the root cause of the thread‑pool plugin enhancement failure in SkyWalking—duplicate AgentClassLoader instances—detailing the investigation steps, code changes, and two practical solutions to ensure reliable instrumentation of ThreadPoolExecutor.

DebuggingInstrumentationJavaAgent
0 likes · 18 min read
Why SkyWalking’s ThreadPool Plugin Failed and How I Fixed It
IT Services Circle
IT Services Circle
Mar 11, 2023 · Fundamentals

Understanding Java Class Loaders and the Parent Delegation Model

This article explains the Java class‑loading mechanism, reviews the load‑link‑initialize process, describes the built‑in Bootstrap, Extension and Application class loaders, introduces the parent‑delegation model, shows its execution flow with code examples, and discusses how to customize or break the model.

Custom ClassLoaderJVMJava
0 likes · 16 min read
Understanding Java Class Loaders and the Parent Delegation Model
NetEase Cloud Music Tech Team
NetEase Cloud Music Tech Team
Feb 17, 2023 · Mobile Development

Optimizing Dynamically Loaded Dex Files Across Android Versions

The article explains how dynamically loaded dex files are optimized on Android 5.0 through 12—detailing AOT compilation via dex2oat, profile‑guided filters, runtime‑filter flags, class‑loader contexts, SELinux limits, and the use of PathClassLoader or the PMS performDexOptSecondary command to achieve performance comparable to installed APKs.

AndroidAoTDex Optimization
0 likes · 17 min read
Optimizing Dynamically Loaded Dex Files Across Android Versions
JD Tech
JD Tech
Feb 14, 2023 · Backend Development

EasyMock Platform Overview and JSF Mock Implementation Guide

This article introduces the EasyMock platform, outlines its key capabilities for service mocking, explains the technical challenges it solves, and provides a detailed step‑by‑step walkthrough of the JSF Mock implementation—including jar acquisition, JVM class loading, dynamic proxy creation, interface registration, client invocation, and parameter matching/return logic—accompanied by code examples.

Dynamic ProxyJSFMocking
0 likes · 12 min read
EasyMock Platform Overview and JSF Mock Implementation Guide
Sohu Tech Products
Sohu Tech Products
Jan 25, 2023 · Mobile Development

Android Plugin Architecture: Class Loading, Resource Injection, Component Communication, and Popular Frameworks

This article explains how Android installs APKs, introduces the concepts of plugins and pluginization, details class‑loader and resource‑injection mechanisms, describes four‑component communication strategies, compares several hooking techniques, and reviews major open‑source plugin frameworks such as Atlas, RePlugin, VirtualApp and Shadow.

AndroidComponentCommunicationResourceInjection
0 likes · 28 min read
Android Plugin Architecture: Class Loading, Resource Injection, Component Communication, and Popular Frameworks
JD Retail Technology
JD Retail Technology
Jan 16, 2023 · Backend Development

EasyMock Platform Overview and JSF Mock Implementation Techniques

This article introduces the EasyMock platform, explains its role in providing JSF and HTTP mock services for development and testing, outlines its architecture and capabilities, and details the step‑by‑step technical implementation of JSF Mock including jar downloading, JVM class loading, dynamic proxy creation, registration, client invocation, parameter matching, and response deserialization.

BackendDynamic ProxyJSF
0 likes · 11 min read
EasyMock Platform Overview and JSF Mock Implementation Techniques
58 Tech
58 Tech
Nov 3, 2022 · Mobile Development

Understanding Android Plugin Architecture and a Minimal Plugin Implementation

This article explains the fundamentals of Android pluginization, covering class loading, resource handling, Dex and OAT formats, security considerations, and presents a lightweight plugin framework used by 58.com to reduce app size and enable dynamic updates.

AndroidDEXDynamic Loading
0 likes · 30 min read
Understanding Android Plugin Architecture and a Minimal Plugin Implementation
DeWu Technology
DeWu Technology
Aug 15, 2022 · Backend Development

Implementing ClassLoader Isolation for Script Execution in a Business Monitoring Platform

The article explains how a Business Monitoring Platform isolates user‑defined Groovy scripts by assigning each script its own custom Java ClassLoader that loads uploaded JARs, breaking parent‑delegation, preventing class conflicts, reducing Metaspace growth, and dynamically creating Feign and Dubbo beans for safe, independent execution.

Backend DevelopmentDubboDynamic Loading
0 likes · 12 min read
Implementing ClassLoader Isolation for Script Execution in a Business Monitoring Platform
IEG Growth Platform Technology Team
IEG Growth Platform Technology Team
Aug 10, 2022 · Mobile Development

Introduction to the Shadow Android Plugin Framework

The Shadow framework, developed by Tencent, is an open‑source Android plugin solution that reuses independent app source code, employs zero‑reflection dynamic loading, minimizes host footprint, and provides detailed module architecture, component support, Flutter integration, and isolation mechanisms for stable, dynamic plugin development.

AndroidDynamic LoadingFlutter Integration
0 likes · 9 min read
Introduction to the Shadow Android Plugin Framework
Wukong Talks Architecture
Wukong Talks Architecture
Jul 31, 2022 · Backend Development

Understanding Java Reflection, Class Loading, and Dynamic Proxy Mechanisms

This article provides a comprehensive guide to Java's reflection mechanism, class loading process, ClassLoader usage, and dynamic proxy techniques, illustrating how to inspect class structures, create objects, access fields and methods, retrieve generic type information, and implement both static and dynamic proxies with practical code examples.

DynamicProxyGenericsJava
0 likes · 45 min read
Understanding Java Reflection, Class Loading, and Dynamic Proxy Mechanisms
JD Tech
JD Tech
Jul 27, 2022 · Backend Development

Understanding Java ClassLoader, Custom ClassLoader, Hot Swapping, SPI, and Java Agent for Plugin Development

This article explains the Java parent‑delegation model, shows how to implement a custom ClassLoader for class hot‑swap and jar hot‑deployment, demonstrates Java SPI for dynamic service loading, and details building a plugin framework using Java Agent and Javassist for runtime bytecode enhancement.

HotSwapJavaAgentJavassist
0 likes · 30 min read
Understanding Java ClassLoader, Custom ClassLoader, Hot Swapping, SPI, and Java Agent for Plugin Development
DeWu Technology
DeWu Technology
Jul 13, 2022 · Backend Development

Diagnosing G1 Young GC Slowdown Caused by Excessive XStream ClassLoader Creation

The investigation revealed that repeatedly creating XStream objects generated thousands of CompositeClassLoader instances, inflating the JVM’s SystemDictionary and causing extremely long Ext Root Scanning during G1 Young GC pauses, which was resolved by caching XStream per class and reducing YGC pauses from seconds to milliseconds.

JavaXStreamYGC
0 likes · 17 min read
Diagnosing G1 Young GC Slowdown Caused by Excessive XStream ClassLoader Creation
JD Retail Technology
JD Retail Technology
Jun 14, 2022 · Backend Development

Understanding Java ClassLoader, Custom ClassLoaders, Hot Swapping, SPI, and Java Agent Plugin Framework

This article explains the Java parent‑delegation model, shows how to implement custom ClassLoaders for class hot‑swap and jar hot‑deployment, demonstrates SPI‑based class replacement, introduces Java Agent premain/agentmain mechanisms, and presents a plugin framework that combines SPI, Java Agent, and Javassist for dynamic enhancement.

HotSwapJavaJavaAgent
0 likes · 27 min read
Understanding Java ClassLoader, Custom ClassLoaders, Hot Swapping, SPI, and Java Agent Plugin Framework
Programmer DD
Programmer DD
Jun 12, 2022 · Fundamentals

Mastering Java ClassLoaders: APIs, Hierarchy, and Common Pitfalls

This article explores Java’s ClassLoader mechanism, detailing its core API methods, hierarchical delegation model, and the nuances of class loading in Java EE environments, while providing practical code examples and troubleshooting tips for common errors such as NoClassDefFoundError, NoSuchMethodError, and ClassCastException.

DebuggingJavaJava EE
0 likes · 17 min read
Mastering Java ClassLoaders: APIs, Hierarchy, and Common Pitfalls
Cognitive Technology Team
Cognitive Technology Team
May 7, 2022 · Fundamentals

Understanding Java Context ClassLoader and How It Breaks the Parent Delegation Model

This article explains why Java introduced the Context ClassLoader to bypass the parent‑delegation model, demonstrates its role in SPI mechanisms such as JDBC driver loading, compares class loader behavior in Spring Boot development versus packaged execution, and highlights common pitfalls when using custom class loaders.

ContextClassLoaderJavaSPI
0 likes · 8 min read
Understanding Java Context ClassLoader and How It Breaks the Parent Delegation Model
政采云技术
政采云技术
Mar 15, 2022 · Fundamentals

Understanding Java Class Loading Mechanism and Runtime Data Areas

This article explains how the JVM loads and links class files, describes the five runtime data areas—including the Method Area, Heap, JVM Stacks, Program Counter, and Native Method Stack—and details the class‑loader hierarchy and the parent‑delegation model used during class loading.

JVMJavaMemory Model
0 likes · 17 min read
Understanding Java Class Loading Mechanism and Runtime Data Areas
Top Architect
Top Architect
Mar 13, 2022 · Information Security

Techniques for Protecting Java Bytecode from Decompilation

This article explains why Java bytecode is easy to decompile and introduces several practical techniques—including isolation, class encryption, native code conversion, and various forms of code obfuscation—to increase the difficulty of reverse‑engineering Java applications.

JavaObfuscationSecurity
0 likes · 13 min read
Techniques for Protecting Java Bytecode from Decompilation
Sanyou's Java Diary
Sanyou's Java Diary
Feb 6, 2022 · Fundamentals

Demystifying Java Class Loading: Steps, ClassLoaders, and Common Pitfalls

This article explains the Java class loading lifecycle, the different built‑in and custom ClassLoaders, the parent‑delegation model, reasons for breaking it (e.g., JDBC and Tomcat), how to implement custom loaders, hot‑deployment techniques, and includes typical interview code questions.

Hot DeploymentJVMParent Delegation
0 likes · 13 min read
Demystifying Java Class Loading: Steps, ClassLoaders, and Common Pitfalls
Java Interview Crash Guide
Java Interview Crash Guide
Jan 20, 2022 · Backend Development

Mastering Java Resource Loading: Class vs ClassLoader and Spring Tips

This article explains how to correctly load resources in Java using Class and ClassLoader getResource methods, compares their behavior, demonstrates batch resource retrieval, and shows how Spring's ResourceLoader and ResourcePatternResolver simplify resource access, providing practical code examples and best‑practice guidelines.

Backend DevelopmentJavaclassloader
0 likes · 8 min read
Mastering Java Resource Loading: Class vs ClassLoader and Spring Tips
Ops Development Stories
Ops Development Stories
Jan 14, 2022 · Fundamentals

When Does Java Load a Class? Exploring the 7 Stages, Parent Delegation, and Custom ClassLoaders

This article explains the complete Java class loading lifecycle—including loading, verification, preparation, resolution, initialization, usage, and unloading—details the seven scenarios that trigger active loading, illustrates the parent delegation model, and provides code examples for custom and Tomcat class loaders.

Custom ClassLoaderJVMJava
0 likes · 16 min read
When Does Java Load a Class? Exploring the 7 Stages, Parent Delegation, and Custom ClassLoaders
Top Architect
Top Architect
Jan 5, 2022 · Information Security

Common Techniques for Protecting Java Programs from Decompilation

The article outlines several common techniques for protecting Java programs from decompilation, including isolation, class file encryption, native code conversion, and various forms of code obfuscation such as symbol, data, control, and preventive obfuscation, and presents a case study of a protected SCJP exam application.

JavaObfuscationclassloader
0 likes · 13 min read
Common Techniques for Protecting Java Programs from Decompilation
Tech Musings
Tech Musings
Dec 4, 2021 · Backend Development

How Byte Buddy Powers Java Agents: Classloader Tricks and Dependency Solutions

This article explores using Byte Buddy to build Java agents, detailing the premain method, class loading mechanisms, handling dependency conflicts with Maven shade versus custom classloaders, and implementing a Dispatcher to bridge agent and application classloaders, providing practical code snippets and diagrams for each step.

Byte BuddyInstrumentationJava Agent
0 likes · 9 min read
How Byte Buddy Powers Java Agents: Classloader Tricks and Dependency Solutions
Selected Java Interview Questions
Selected Java Interview Questions
Nov 15, 2021 · Backend Development

Understanding Java Class Loading, the Parent Delegation Model, and Tomcat’s Custom ClassLoaders

This article reviews Java’s default class loading mechanism and parent‑delegation model, explains how the model can be broken, and details Tomcat’s custom classloader architecture—including Common, Catalina, Shared, Webapp, and JSP loaders—showing why Tomcat deviates from the standard delegation hierarchy.

Backend DevelopmentJavaParent Delegation
0 likes · 14 min read
Understanding Java Class Loading, the Parent Delegation Model, and Tomcat’s Custom ClassLoaders
Senior Brother's Insights
Senior Brother's Insights
Oct 5, 2021 · Fundamentals

How to Resolve Java Jar Conflicts by Adjusting Classloader Order

This article explains why manual jar management can cause class loading conflicts, shows quick IDE-based steps to reorder jars for a temporary fix, and dives into JVM classloader isolation, the parent‑delegation mechanism, and Tomcat's startup loading order to help developers debug and prevent such issues.

BackendDebuggingJVM
0 likes · 12 min read
How to Resolve Java Jar Conflicts by Adjusting Classloader Order
Yang Money Pot Technology Team
Yang Money Pot Technology Team
Jul 27, 2021 · Fundamentals

Understanding Java Class Compilation and Loading: Processes, Annotations, Syntax Sugar, and Class Loader Mechanisms

This article explains the complete Java class compilation and loading lifecycle, covering lexical, syntax, and semantic analysis, annotation processing, syntax‑sugar transformation, bytecode generation, class file structure, the five loading steps, class loader types, the parent‑delegation model, and practical use cases such as dependency conflict resolution, hot‑loading, and code encryption.

Class CompilationJavaannotations
0 likes · 22 min read
Understanding Java Class Compilation and Loading: Processes, Annotations, Syntax Sugar, and Class Loader Mechanisms
Top Architect
Top Architect
Apr 18, 2021 · Backend Development

Understanding Spring Boot Executable JAR Packaging and the Role of JarLauncher

This article explains how Spring Boot's spring-boot-maven-plugin creates an executable fat JAR, details its internal structure, the purpose of the JarLauncher class, and the custom class loading mechanisms used to launch the application, including code examples and manifest analysis.

JarLauncherSpring Bootclassloader
0 likes · 12 min read
Understanding Spring Boot Executable JAR Packaging and the Role of JarLauncher
Java Captain
Java Captain
Feb 19, 2021 · Backend Development

Understanding Spring Boot Executable JAR Packaging and the Role of JarLauncher

This article explains how Spring Boot's spring-boot-maven-plugin creates an executable JAR, describes the internal JAR structure, the function of the JarLauncher class, and details the custom class loader mechanisms that enable Spring Boot applications to run directly with java -jar.

JarLauncherJavaMaven Plugin
0 likes · 15 min read
Understanding Spring Boot Executable JAR Packaging and the Role of JarLauncher
Alibaba Cloud Native
Alibaba Cloud Native
Feb 4, 2021 · Backend Development

Why Spring Boot’s War‑to‑Jar Deployment Slows Down Feign Calls and How to Fix It

After upgrading an internal framework, a company’s UAT environment saw throughput drop from 53.9/s to 6.4/s due to abnormal Feign latency, prompting a deep dive with Arthas profiling, code tracing, and class‑loader analysis that uncovered costly JodaModule loading and class‑loader overhead, leading to targeted fixes that restored and even improved performance.

ArthasJavaSpring Boot
0 likes · 16 min read
Why Spring Boot’s War‑to‑Jar Deployment Slows Down Feign Calls and How to Fix It
JavaEdge
JavaEdge
Jan 23, 2021 · Fundamentals

Demystifying Java Class Loading: From Load to Initialization

This article explains how the Java Virtual Machine loads .class files into memory, detailing the three-stage process of loading, linking (verification, preparation, resolution), and initialization, while also covering array loading, custom class loaders, and common pitfalls such as deprecated APIs and verification options.

BackendClassLoadingJVM
0 likes · 10 min read
Demystifying Java Class Loading: From Load to Initialization
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Jan 19, 2021 · Backend Development

Understanding Java's Parent Delegation Model: Mechanism, Implementation, and How to Break It

This article explains Java's parent delegation class‑loading model, describes the four built‑in class loaders, details why delegation is needed, shows the loadClass implementation, and discusses how and why the mechanism can be overridden in frameworks such as JDBC, Tomcat, OSGi, and the Java 9 module system.

Custom ClassLoaderJVMJava
0 likes · 14 min read
Understanding Java's Parent Delegation Model: Mechanism, Implementation, and How to Break It
Alibaba Cloud Developer
Alibaba Cloud Developer
Dec 29, 2020 · Backend Development

How to Implement Class Isolation in Java with Custom ClassLoaders

This article explains why jar version conflicts cause runtime errors in Java, introduces class isolation as a solution, and provides step‑by‑step implementations of custom ClassLoaders using both findClass and loadClass overrides, complete with code examples and execution results.

Class IsolationCustom ClassLoaderDependency Conflict
0 likes · 13 min read
How to Implement Class Isolation in Java with Custom ClassLoaders
ITFLY8 Architecture Home
ITFLY8 Architecture Home
Dec 28, 2020 · Fundamentals

Unlocking Java: How the JVM Loads and Instantiates Classes

This article explains the Java class‑loading lifecycle—including loading, linking, and initialization—covers the parent‑delegation model, demonstrates custom class loaders, and details the bytecode steps of object instantiation, while comparing ClassLoader.loadClass with Class.forName.

JavaObject Instantiationclassloader
0 likes · 11 min read
Unlocking Java: How the JVM Loads and Instantiates Classes
Youku Technology
Youku Technology
Aug 31, 2020 · Backend Development

Java Dynamic Class Loading, HotSwap, and Multi-ClassLoader Strategies for YMAP Micro-Application Platform

The article explains how Java’s dynamic class loading, HotSwap, and multi‑ClassLoader architectures can overcome long restart times, detailing YMAP’s serverless‑style platform that uses isolated ClassLoaders, cgroup‑based multi‑tenant isolation, and rapid build‑to‑test pipelines to achieve second‑level deployments.

HotSwapJavaResource Isolation
0 likes · 10 min read
Java Dynamic Class Loading, HotSwap, and Multi-ClassLoader Strategies for YMAP Micro-Application Platform
Selected Java Interview Questions
Selected Java Interview Questions
Jun 12, 2020 · Fundamentals

Deep Dive into Java ClassLoader, Class Loading Process, and the Parent‑Delegation Model

This article explains when and how Java classes are loaded, details the JVM's ClassLoader implementation—including the native defineClass1 method, InstanceKlass creation, SystemDictionary registration, and parallel loading locks—then demonstrates breaking the parent‑delegation model with a custom ClassLoader and discusses practical usage scenarios.

JVMJavaMetaspace
0 likes · 18 min read
Deep Dive into Java ClassLoader, Class Loading Process, and the Parent‑Delegation Model
Programmer DD
Programmer DD
May 12, 2020 · Backend Development

When Does Class.forName Initialize a Class? Java Class Loading Explained

This article explains the difference between Java's Class.forName and ClassLoader when loading classes, shows how the initialize flag controls static initialization, provides code examples, and discusses practical scenarios such as Spring IoC and JDBC driver registration.

JDBCJavaclassloader
0 likes · 7 min read
When Does Class.forName Initialize a Class? Java Class Loading Explained
FunTester
FunTester
Oct 24, 2019 · Backend Development

Executing Groovy Test Scripts Dynamically from Java: A Practical Guide

This article explains how to build a Java wrapper that loads and runs Groovy test scripts at runtime, covering classloader nuances, reflection-like execution, file discovery, method filtering, and provides a complete code example for a custom test framework.

GroovyJavaReflection
0 likes · 6 min read
Executing Groovy Test Scripts Dynamically from Java: A Practical Guide
Ziru Technology
Ziru Technology
Aug 29, 2019 · Backend Development

Why Spring Boot Devtools Triggers ClassCastException and How to Fix It

This article explains why adding spring-boot-devtools can trigger a ClassCastException due to its dual classloader mechanism, demonstrates how to reproduce the issue in a Maven multi‑module project, and provides two practical solutions: customizing the RestartClassLoader or removing the devtools dependency.

ClassCastExceptionDevToolsDubbo
0 likes · 13 min read
Why Spring Boot Devtools Triggers ClassCastException and How to Fix It
Java Backend Technology
Java Backend Technology
Jul 27, 2019 · Backend Development

Unlock Java’s Hidden Power: Mastering SPI and JAR Mechanics

This article explains the fundamentals of Java SPI and JAR mechanisms, showing how to define and load service implementations, explore JAR metadata and commands, understand class‑loader hierarchies, Tomcat’s loader architecture, Spring Boot’s nested JAR handling, and how to create custom class loaders.

JARJavaSPI
0 likes · 10 min read
Unlock Java’s Hidden Power: Mastering SPI and JAR Mechanics
360 Tech Engineering
360 Tech Engineering
Jul 15, 2019 · Mobile Development

Detailed Analysis of Android ClassLoader Loading Mechanism

This article provides an in‑depth examination of Android's ClassLoader architecture, explaining how BaseDexClassLoader.findClass() and ClassLoader.loadClass() locate and load classes, with step‑by‑step source code analysis of loadClass, findLoadedClass, findClass, DexPathList, DexFile, and native class definition processes.

AndroidDEXDynamicLoading
0 likes · 11 min read
Detailed Analysis of Android ClassLoader Loading Mechanism
Java Captain
Java Captain
May 3, 2019 · Fundamentals

Understanding the Composition of the Java Virtual Machine (JVM)

This article explains the overall architecture of the JVM, details each component of its runtime data area—including program counter, stacks, heap, and method area—and discusses related concepts such as the runtime constant pool and direct memory, providing a comprehensive overview for developers.

JVMJavaMemory Management
0 likes · 9 min read
Understanding the Composition of the Java Virtual Machine (JVM)