Modify javap to output to String, view decompiled information at runtime.
I asked the following question on Stackoverflow: "I am working with an application webserver and have complicated classloading issues. I want to be able to download or print information that would normally get printed by javap (the methods, etc). I may also need to get the raw binary class data, to perform a binary diff. How would you do this?" I was not satisfied with the responses from stack. Sure, I could have used reflection to print information on a particular class from the web, but I was looking for the output from javap . Javap is essentially a decompiler that comes with Sun's set of Java tools, it is used to print the method names and other information for an associated class. It is a useful tool, how do you run the tool on code that is deployed on a server, at runtime? It seemed obvious that javap was written in Java, so I naturally assumed that the source was available with openjdk. Source for javap is available GPL licensed in the mercurial repository. Th