内核启动程序CoreLauncher.java,具体的使用可以参照attach方式。
/**
* 内核启动程序
*
* @param args 参数
* [0] : PID
* [1] : agent.jar’s value
* [2] : token 配置参数, 可以结合bin/sandbox.sh 里的attach_jvm来看
*/
public static void main(String[] args) {
try {
// check args
if (args.length != 3
|| StringUtils.isBlank(args[0])
|| StringUtils.isBlank(args[1])
|| StringUtils.isBlank(args[2])) {
throw new IllegalArgumentException("illegal args");
}
new CoreLauncher(args[0], args[1], args[2]);
} catch (Throwable t) {
t.printStackTrace(System.err);
System.err.println("sandbox load jvm failed : " + getCauseMessage(t));
System.exit(-1);
}
}