With the jmap command I can view variables and their state. Similarly is there an open source tool to save the byte code that is running in the JVM? Although we have the source code, there are times when its changed - with the help of AOP for example. Also there could be different versions of the code at runtime, like for example a classpath that has 2 versions of a jar ...
Aim is to be able to attach to a process on my system, and save the state of the JVM including the byte code to files, for further inspection, without changing anything in the launcher. So we connect when the process is running, take out snapshot and the detach (so we do not disturb existing production system much).
Can use Open JDK or Oracle JDK to run the app.