java agent打的jar中设置这个'Can-Retransform-Classes:true'的深层用意是什么,为什么还要多此一举
参考文档摘要
Can-Redefine-Classes与Can-Retransform-Classes声明为true,表示允许这段程序修改java应用的代码。
官方文档摘要
Can-Redefine-Classes
Boolean (true or false, case irrelevant). Is the ability to redefine classes needed by this agent. Values other than true are considered false. This attribute is optional, the default is false.
Can-Retransform-Classes
Boolean (true or false, case irrelevant). Is the ability to retransform classes needed by this agent. Values other than true are considered false. This attribute is optional, the default is false.
参考
java.lang.instrument (Java SE 14 & JDK 14) declaration: module: java.instrument, package: java.lang.instrument https://docs.oracle.com/en/java/javase/14/docs/api/java.instrument/java/lang/instrument/package-summary.html
带你轻松学 java-agent-云社区-华为云 java-agent是应用于java的trace工具,核心是对JVMTI(JVM Tool Interface)的调用。 https://bbs.huaweicloud.com/blogs/detail/260776