{
  "schemaVersion": "ebb.rule.v1",
  "id": "java.jdk.end-of-support-22-24",
  "ecosystem": "java",
  "purl": "pkg:generic/java",
  "affectedVersions": "vers:semver/>=22.0.0|<25.0.0",
  "event": "end-of-support",
  "severity": "high",
  "title": "Java 22 to 24 are no longer supported",
  "summary": "The Oracle Java SE Support Roadmap lists Java 22 to 24 as non-LTS releases whose Premier Support ended between September 2024 and September 2025. It says a previous non-LTS release is superseded once a new feature release is made available. The Eclipse Temurin support page lists Java 22, 23, and 24 as EOSL, with end of availability in September 2024, March 2025, and September 2025.",
  "replacement": "Java 25 (LTS) or later",
  "sources": [
    {
      "title": "Oracle Java SE Support Roadmap",
      "url": "https://www.oracle.com/java/technologies/java-se-support-roadmap.html",
      "accessedAt": "2026-10-17"
    },
    {
      "title": "Eclipse Temurin support",
      "url": "https://adoptium.net/support/",
      "accessedAt": "2026-10-17"
    }
  ],
  "provenance": {
    "observedAt": "2026-10-17",
    "reviewedAt": "2026-10-17",
    "reviewer": "arminazimi"
  },
  "migration": {
    "constraints": [
      "Keep the JDK in the build files, the version pin files, CI, and container images on one supported release; a long-term-support release avoids repeating this migration every six months.",
      "Check that the Gradle or Maven version in the project can run on the target JDK (the Gradle compatibility matrix lists the supported Java versions).",
      "A compile level (`maven.compiler.release`, `sourceCompatibility`) is not the JDK that runs the code: lower it only if the code must still run on an older runtime."
    ],
    "steps": [
      {
        "id": "update-jdk-declaration",
        "title": "Move the reported declaration to a supported JDK",
        "instructions": "Change the reported version to a long-term-support release (see the replacement) in the build file or the version pin file.",
        "targets": "declaration"
      },
      {
        "id": "align-jdk-surfaces",
        "title": "Align the other JDK declarations",
        "instructions": "Update every other pom.xml, Gradle toolchain, `.java-version`, `.sdkmanrc`, `.tool-versions`, CI JDK setup, and container base image that names the old release, so the repository agrees.",
        "targets": "all"
      }
    ],
    "verification": [
      {
        "command": "./mvnw -B verify || ./gradlew build",
        "purpose": "Build and test the project on the new JDK with the wrapper the project uses."
      },
      {
        "command": "java -version",
        "purpose": "Confirm the JDK on the path (or the one the toolchain selects) is the intended release."
      }
    ]
  }
}
