- OpenJDK 11
- Gradle 7.2
Just use gradle
# build and create an all-in-one jar
gradle build
# the output jar will be app/build/libs/app-all.jar
ls app/build/libs/app-all.jar
# (Optional) build examples jar
cd examples && gradle build && cd -
We have written some test cases using junit. Use gradle to run those tests.
gradle test --info
The testcases are located in app/src/test/java/cn/xxxxxx/iser/jmtrace/testcases
You can use the script ./jmtrace
./jmtrace -jar <xxx.jar>
Or make
# build examples jar
make build-examples
# run with examples
make run-with WITH=app1 ARGS=""
Java agent and ASM
- https://asm.ow2.io/
- https://www.alibabacloud.com/blog/how-to-use-java-agents-with-asm-bytecode-framework_596199
- https://blogs.oracle.com/javamagazine/post/real-world-bytecode-handling-with-asm
- https://www.baeldung.com/java-asm
JVM Spec