fix
parent
501f084a03
commit
f251c3e9dc
|
@ -69,7 +69,8 @@ public class JavaAgent {
|
||||||
//该方法支持在JVM 启动后再启动代理,对应清单的Agent-Class:属性
|
//该方法支持在JVM 启动后再启动代理,对应清单的Agent-Class:属性
|
||||||
public static void agentmain(String args,Instrumentation inst){
|
public static void agentmain(String args,Instrumentation inst){
|
||||||
try{
|
try{
|
||||||
writeLog("args=:[" + args + "]");
|
writeLog("argsxxxxxxxxxx=:[" + args + "]");
|
||||||
|
writeLog("argsxxxxxxxxxxyyy=:[" + args + "]");
|
||||||
File f = new File(args);
|
File f = new File(args);
|
||||||
byte[] targetClassFile = new byte[(int)f.length()];
|
byte[] targetClassFile = new byte[(int)f.length()];
|
||||||
DataInputStream dis = new DataInputStream(new FileInputStream(f));
|
DataInputStream dis = new DataInputStream(new FileInputStream(f));
|
||||||
|
@ -78,7 +79,7 @@ public class JavaAgent {
|
||||||
|
|
||||||
DynamicClassLoader myLoader = new DynamicClassLoader();
|
DynamicClassLoader myLoader = new DynamicClassLoader();
|
||||||
Class targetClazz = myLoader.findClass(targetClassFile);
|
Class targetClazz = myLoader.findClass(targetClassFile);
|
||||||
writeLog("class name is:["+targetClazz.getName() + "]");
|
writeLog("class namexxxxx is:["+targetClazz.getName() + "]");
|
||||||
writeLog("class path is:["+targetClazz.getResource("").getPath() + "]");
|
writeLog("class path is:["+targetClazz.getResource("").getPath() + "]");
|
||||||
Class<?> clz = Class.forName(targetClazz.getName());
|
Class<?> clz = Class.forName(targetClazz.getName());
|
||||||
writeLog("clz-->Class.forName:(\""+targetClazz.getName() + "\")");
|
writeLog("clz-->Class.forName:(\""+targetClazz.getName() + "\")");
|
||||||
|
|
Loading…
Reference in New Issue