VM Agents and JVM TI

Creation of Virtual Machine agents improved with the new Java Virtual Machine (tm) Tool Interface (JVM TI) in JDK 5.0. If you are curious how VM agents work read on, but beware, native code lurks here.

The
JDK 5.0 (Tiger)[2]
and
JDK 6.0 (Mustang)[2]
binary images include the source and binaries of quite a few
demo
Java Virtual Machine Tool Interface (JVM TI)[2]
agents (native libraries) in the demo/jvmti directory.
The more curious people might be interested in the
detailed description
in my blogs.sun.com site onusing VM agents[3].
Certainly writing VM Agents is not something that we want thousands
of people doing, besides everyone wants to write in Java anyway,
right?
But for anyone that needs the tool functionality we certainly
have it now in JDK 5.0.

Tools written in Java can use the
Java Debug Interface (JDI)[2]
and
java.lang.instrument[2]
(which was added in JDK 5.0 and uses JVM TI under the covers).
In the future expect to see extensions to both these Java
level interfaces, all courtesy of the basic functionality of JVM TI
and JNI.

We are also interested in adding useful tool demos to the JDK
or improving the ones we have, so if you have an idea for a useful agent or tool,
consider creating a java.net project and/or contributing it to
the JDK.