jvm.wtf - jvm.wtf – Abusing JVMs because we can

Example domain paragraphs

Abusing JVMs because we can

I was recently wrangling with some nastiness involving several different tools, each of which was performing bytecode instrumentation. The problem was that one tool (Mockito, which I didn’t feel like digging into, and am using as a black-box) was modifying  my transformed code, and it was very difficult to tell exactly what it was doing to my code. It is easy for me to dump out class files for the code that  I  generate, but seemingly hard to get Mockito to do.

Shouldn’t there be some way to simply view/dump bytecode of classes from a running JVM? It’s all just sitting there in the heap, right?