Getting started

Step-by-step guide to getting started with JDK Flight Recorder (JFR), including prerequisites, setting up JFR, and starting a recording.

Getting started with JFR

To get started with JFR, follow these steps:

  1. Prerequisites: Check that your Semeru version supports JFR. For more information about the support matrix, see Introduction.

  2. Set up JFR: Make sure that the $JAVA_HOME/bin directory is included in the system's PATH. For more information, see Setup and configuration.

    • On z/OS, explicitly enable the attach API by using the option -Dcom.ibm.tools.attach.enable=yes on the target JVM for jcmd to discover and connect to it.
  3. Start a recording: Use the jcmd command to start a JFR recording. You can specify the recording duration, output file and other options as needed. For more information, see Data collection.

  4. View and analyze the recording: After the recording is complete, you can view and analyze the data by using a tool such as JDK Mission Control (JMC) or by using JFR commands. For more information, see Data visualization and Data analysis.

By following these steps, you can get started with using JFR to profile and troubleshoot your Java applications.