Prerequisites for Object Instance Tracking

  • Review Java Supported Environments for information about platform support for object instance tracking.
  • For JVMs prior to Java 9, object instance tracking uses tools.jar. If your application runs with the JDK, tools.jar should be already available. If you are running with the JRE, you must add tools.jar to <JRE_HOME>/lib/ext and restart the JVM. You can find tools.jar in <JAVA_HOME>/lib/tools.jar.
  • In some cases, you might also need to copy libattach.so (Linux) or attach.dll (Windows) from your JDK to your JRE.
  • Depending on the JDK version, you may also need to specify the classpath as shown below (along with other -jar options).
  • For Java 9 or later, JEP220 moved the capabilities needed by OIT to the Core Java runtime, therefore tools.jar is no longer necessary. If your application runs with JDK9+, jdk.jcmd is already available. If you are running with the JRE, you must add jdk.jcmd to <JRE_HOME>/bin and <JRE_HOME>/lib using jlink.
Note: jdk.jcmd is no longer a required module for the custom runtime. However, it is required for the proper functioning of object instance tracking.