title: Change root package of Java JAR
body: <p>I am writing a Java Agent which makes use of the Java ASM library for handling byte code. This is a common library and I want to be sure about the version of ASM which my code is using at runtime.</p>
  
  <p>What is the easiest and most automated way to take the ASM classes and process them into a private copy where all the classes have been relocated into a new root package. </p>
  
  <p>To be specific, I want to take the ASM jars and turn <code>org.objectweb.asm.*</code> into <code>org.myproject.internal.org.objectweb.asm.*</code></p>
  
  <p>Please remember that I am mostly interested in an automated solution. I know that I could get the sources for ASM and do this manually or with a script and then recompile the jars but this feels like a lot of overhead.</p>