We wrote a javaagent to help developers debugging. But, before releasing this tool, we still have some questions about the deployment of java-agent.
User may use the agent with some tomcat applications. The agent uses Premain method to transform classes. We use javassist 3.18.2-GA to insert codes. We currently add javassist.jar into Boot-Class-Path in MANIFEST.MF. And We put both the agent and javassist.jar into tomcat's lib directory.
The questions are:
A javaagent is added and run on the VM's class path. Therefore, you have the following options:
Instrumentation
API to manually append the dependencies before running your actual agent application.