Skip to main content


Adding JVM options

This guide explains how to add required JVM options to effectively use the Java monitoring agent in the WebSphere application server environment. To add JVM options, access the Admin console.

  1. Log in the Admin Console in your web browser.

  2. Select Environment > Virtual Hosts > default host > Host Aliases and then check the port number of the server to install the agent to.

    WebSphere port

  3. Go to Servers > Server Types > Websphere application servers and then select a server to install the agent to.

    WebSpherer application servers

  4. Select the Configuration tab on the selected server screen and then select Java and Process Management > Process definition in the Server Infrastructure section.

    WebSphere Configuration

  5. Among the menus on the right, select Additional Properties > Java Virtual Machine.

  6. In the Configuration tab, add -javaagent and -Dwhatap.port to the Generic JVM arguments field.

    -Dwhatap.port={port number} ## Port number of the item 2 ##

    Add JVM arguments


In case of Java 17 or later, add the following options for reflection.


Viewing the heap histogram

WhaTap's Java Monitoring provides the function to view the status of heap occupancy objects in the JVM memory (sizes for each object in heap memory). In APP > Instance performance analysis, select the Heap histogram tab.

Java versions 6 to 8 support basic functions without the JVM options. However, for some Java versions, the JVM options must be applied as follows:

  • Java 9 to Java 15

    java -javaagent:{WHATAP_HOME}/whatap.agent-X.Y.Z.jar -Djdk.attach.allowAttachSelf=true -jar {application.jar}
  • Java 16 or later

    java -javaagent:{WHATAP_HOME}/whatap.agent-X.Y.Z.jar -Djdk.attach.allowAttachSelf=true --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=jdk.attach/ -jar {application.jar}

It does not support Java 5 or earlier and IBM Java.

Starting the monitoring

Once the application server is restarted after configuring all settings, the agents start collecting data. See the following.