Skip to content

About

javaagent instrumentation

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

javaagent-example

Example of how to instrument the java class files on class loading. You can change(instrument) the byte code without changing the java source file and recompiling.

Usage

Package the agent jar file.

mvn clean package

Find the packaged jar file in target directory and add it to the java command line options. For example.

java -javaagent:/Users/liuzhengyang/Code/opensource/github/javaagent/target/javaagent-1.0-SNAPSHOT-jar-with-dependencies.jar Test

Most processing happens in com.lzy.javaagent.AgentMain, you can change it and add your own logic.

Have Fun!

About

javaagent instrumentation

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages