1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
| package com.whyc;
|
| import java.lang.instrument.Instrumentation;
|
| /**
| * 监听类加载
| * <p>
| * 启动jar java -javaagent:this.jar='-pwd 0000000' -jar aa.jar
| * <p>
| *
| * @author perry
| */
| public class Agent {
|
| /**
| * man方法执行前调用
| *
| * @param args 参数
| * @param inst inst
| * @throws Exception Exception
| */
| public static void premain(String args, Instrumentation inst) throws Exception {
| CoreAgent.premain(args, inst);
| }
| }
|
|