back_recharge
wangyuan 2019-09-17 19:46:50 +08:00
parent 501f084a03
commit f251c3e9dc
1 changed files with 3 additions and 2 deletions

View File

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