March 2019
Intermediate to advanced
242 pages
6h 21m
English
Let's get started with a simple HelloWorld example, as follows:
class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello World - This is being recorded");
}
}
To start flight recording for the preceding application, execute the following command on your console:
> java -XX:StartFlightRecording,filename=hello.jfr
HelloWorld
The first line instructs the Java Runtime to start flight recording for your HelloWorld application and save it to the HelloWorldRecording.jfr file.
There are three parts to the previous command, as follows:
Read now
Unlock full access