1. Install OpenJDK and use it as default one (output of echo $JAVA_HOME is /usr/lib/jvm/java-8-openjdk-amd64
  2. Checkout Spring
  3. Build as specified in https://github.com/spring-projects/spring-framework/wiki/Build-from-Source (./gradlew build)
  4. Go to console and see compilation errors:
s.tsypanov@UAIEV8529NBL:~/IdeaProjects/spring-framework$ ./gradlew build

Welcome to Gradle 6.7!

Here are the highlights of this release:
 - File system watching is ready for production use
 - Declare the version of Java your build requires
 - Java 15 support

For more details see https://docs.gradle.org/6.7/release-notes.html

Starting a Gradle Daemon, 2 busy and 4 incompatible and 1 stopped Daemons could not be reused, use --status for details

> Task :spring-core:compileJava
/home/s.tsypanov/IdeaProjects/spring-framework/spring-core/src/main/java/org/springframework/core/metrics/jfr/FlightRecorderStartupEvent.java:19: error: package jdk.jfr does not exist
import jdk.jfr.Category;
              ^
/home/s.tsypanov/IdeaProjects/spring-framework/spring-core/src/main/java/org/springframework/core/metrics/jfr/FlightRecorderStartupEvent.java:20: error: package jdk.jfr does not exist
import jdk.jfr.Description;
              ^
/home/s.tsypanov/IdeaProjects/spring-framework/spring-core/src/main/java/org/springframework/core/metrics/jfr/FlightRecorderStartupEvent.java:21: error: package jdk.jfr does not exist
import jdk.jfr.Event;
              ^
/home/s.tsypanov/IdeaProjects/spring-framework/spring-core/src/main/java/org/springframework/core/metrics/jfr/FlightRecorderStartupEvent.java:22: error: package jdk.jfr does not exist
import jdk.jfr.Label;
              ^
/home/s.tsypanov/IdeaProjects/spring-framework/spring-core/src/main/java/org/springframework/core/metrics/jfr/FlightRecorderStartupEvent.java:37: error: cannot find symbol
class FlightRecorderStartupEvent extends Event {
                                         ^
  symbol: class Event
/home/s.tsypanov/IdeaProjects/spring-framework/spring-core/src/main/java/org/springframework/core/metrics/jfr/FlightRecorderStartupEvent.java:34: error: cannot find symbol
@Category("Spring Application")
 ^
  symbol: class Category
/home/s.tsypanov/IdeaProjects/spring-framework/spring-core/src/main/java/org/springframework/core/metrics/jfr/FlightRecorderStartupEvent.java:35: error: cannot find symbol
@Label("Startup Step")
 ^
  symbol: class Label
/home/s.tsypanov/IdeaProjects/spring-framework/spring-core/src/main/java/org/springframework/core/metrics/jfr/FlightRecorderStartupEvent.java:36: error: cannot find symbol
@Description("Spring Application Startup")
 ^
  symbol: class Description
/home/s.tsypanov/IdeaProjects/spring-framework/spring-core/src/main/java/org/springframework/core/metrics/jfr/FlightRecorderStartupEvent.java:43: error: cannot find symbol
        @Label("Name")
         ^
  symbol:   class Label
  location: class FlightRecorderStartupEvent
/home/s.tsypanov/IdeaProjects/spring-framework/spring-core/src/main/java/org/springframework/core/metrics/jfr/FlightRecorderStartupEvent.java:46: error: cannot find symbol
        @Label("Tags")
         ^
  symbol:   class Label
  location: class FlightRecorderStartupEvent
/home/s.tsypanov/IdeaProjects/spring-framework/spring-core/src/main/java/org/springframework/core/metrics/jfr/FlightRecorderStartupStep.java:47: error: cannot find symbol
                this.event.begin();
                          ^
  symbol:   method begin()
  location: variable event of type FlightRecorderStartupEvent
/home/s.tsypanov/IdeaProjects/spring-framework/spring-core/src/main/java/org/springframework/core/metrics/jfr/FlightRecorderStartupStep.java:86: error: cannot find symbol
                this.event.end();
                          ^
  symbol:   method end()
  location: variable event of type FlightRecorderStartupEvent
/home/s.tsypanov/IdeaProjects/spring-framework/spring-core/src/main/java/org/springframework/core/metrics/jfr/FlightRecorderStartupStep.java:87: error: cannot find symbol
                if (this.event.shouldCommit()) {
                              ^
  symbol:   method shouldCommit()
  location: variable event of type FlightRecorderStartupEvent
/home/s.tsypanov/IdeaProjects/spring-framework/spring-core/src/main/java/org/springframework/core/metrics/jfr/FlightRecorderStartupStep.java:94: error: cannot find symbol
                this.event.commit();
                          ^
  symbol:   method commit()
  location: variable event of type FlightRecorderStartupEvent

> Task :spring-core:compileJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':spring-core:compileJava'.
> Compilation failed; see the compiler error output for details.

Looks like JAR is missing for the following imports

import jdk.jfr.Category;
import jdk.jfr.Description;
import jdk.jfr.Event;
import jdk.jfr.Label;

Comment From: bclozel

As documented in the Build from Source wiki page (linked from the CONTRIBUTING main file), you'll need a JDK that ships with the Jav Flight Recorder classes.