Tagged articles
2 articles
Page 1 of 1
Code Ape Tech Column
Code Ape Tech Column
Oct 14, 2024 · Backend Development

Understanding Java Agent: Premain and Agentmain Modes with Instrumentation

This article explains the concept of Java Agent, compares it with AOP, and provides step‑by‑step implementations of both premain and agentmain modes, including Maven packaging, VM attachment, class transformation, redefinition, retransformation, and a Javassist example for method timing.

AgentmainBytecode ManipulationInstrumentation
0 likes · 17 min read
Understanding Java Agent: Premain and Agentmain Modes with Instrumentation
Su San Talks Tech
Su San Talks Tech
May 4, 2023 · Backend Development

Unlock JVM Power: Master Java Agent Premain & Agentmain for Runtime Instrumentation

This tutorial explains Java Agent technology, compares it with AOP, and provides step‑by‑step implementations of Premain and Agentmain modes, covering agent packaging, manifest configuration, instrumentation APIs, class transformation, redefinition, retransformation, and integration with Javassist for dynamic bytecode manipulation.

AgentmainBytecode ManipulationInstrumentation
0 likes · 21 min read
Unlock JVM Power: Master Java Agent Premain & Agentmain for Runtime Instrumentation