I am struggling to understand the purpose of the Attach API (com.sun.tools.attach.*). What are its typical uses? Is it to “mock” a JVM so you can test out your code without deploying/launching it, is it a debugger, or does it give you access to the JVM that will run your app once its built and ran?
I think I’m getting hung up on the word attached. I can’t tell if this means “deployed to”, “embedded inside of” or other.
Its for management agents, debuggers etc… to attach to the JVM. http://docs.oracle.com/javase/6/docs/jdk/api/attach/spec/com/sun/tools/attach/package-summary.html
e.g. Connect (attach) to a JVM to manage it or interact with it through the debugger.
Its a com.sun API so its not an official Java API. If you ran another vendor’s JVM it may not have this api at all.