JDasm is a library written in java to easily manipulate Java class files. It gives you the ability to load a class file and modify it or write a new one from scratch; you can inspect it, edit or export any part of the class file and import it into anothe