title: Starting a Java agent after program start
body: <p>Is it possible to insert a javaagent after virtual machine start from within the same VM?</p>
  
  <p>Lets say for example we have an agent in a jar myagent.jar with the appropriate meta data set-up and an agentmain method already implemented. Now the users program calls an API call which should result in the insertion of the agent so that it can redefine the classes.</p>
  
  <p>Can it be done and how?</p>