JVMTI Demonstration Code

The JavaTM Virtual Machine Tools Interface (JVMTI) is a native tool interface provided in v1.5. Native libraries that use JVMTI and are loaded into the JavaTM Virtual Machine via the -agentlib, -agentpath, or -Xrun (deprecated) interfaces, are called Agents.

JVMTI was designed to work with the JavaTM Native Interface (JNI), and eventually displace the JavaTM Virtual Machine Debugging Interface (JVMDI) and the JavaTM Virtual Machine Profiling Interface (JVMPI).

We have tried to create a set of demonstration agents that should help demonstrate many of the features and abilities of the interface. This list of demonstration agents will change over time. They are provided as educational tools and as starting points for JavaTM tool development.

Agents

Agent Support

Native Library Build Hints

All libraries loaded into java are assumed to be MT-safe (Multi-thread safe). This means that multiple threads could be executing the code at the same time, and static or global data may need to be placed in critical sections. See the Raw Monitor interfaces for more information.

All native libraries loaded into the JavaTM Virtual Machine, including Agent libraries, need to be compiled and built in a compatible way. Certain native compilation options or optimizations should be avoided, and some are required. More information on this options is available in the man pages for the various compilers.

For More Information

For more detailed information on JVMTI, refer to http://java.sun.com/j2se/1.5.0/docs/guide/jvmti.

More information on using JNI and building native libraries refer to: http://java.sun.com/j2se/1.5.0/docs/guide/jni.

Additional information can also be found by doing a search on "JVMTI" at http://java.sun.com/j2se. Various technical articles are also available through this website. And don't forget the JavaTM Tutorials at http://java.sun.com/docs/books/tutorial for getting a quick start on all the various interfaces.

Comments and Feedback

Comments regarding JVMTI or on any of these demonstrations should be sent through http://java.sun.com/mail/