I use java instrument(premain) to change bytecode,i used losts of jars,like asm,spring,guava.When i package this agent to a jar and run this jar on a springboot's,it always tell me java.lang.NoClassDefFoundError.I know i can add Boot-Class-Path to the manifest file or use instrument's api to add jar,but is there an quick way to add jars to javaagent's classpath?
Asked
Active
Viewed 81 times
0
-
1What do you mean with “quick way”? Besides that, is it really the agent requiring spring, guava and a lot more? Or is it the instrumented code? An instrumentation agent needing to be instrumented itself sounds like horror… – Holger Jul 18 '17 at 12:54
-
I just need jars like guava,spring,logback to do something.Current solution need to add jar path in manifest file,one by one. – Crytis Jul 31 '17 at 06:14
-
https://en.wikipedia.org/wiki/Separation_of_concerns – Holger Jul 31 '17 at 10:16