Skip to content

Upgrade from JDK 8 to JDK 17 (LTS) #802

@ismisepaul

Description

@ismisepaul

Summary

The project currently targets JDK 8 across the entire stack: Maven compiler (`1.8` / `1.8`), Docker runtime (`tomcat:8-jre8-openjdk`), CI workflows, provisioning scripts, and documentation. JDK 8 public updates ended in March 2019 (Oracle), and Tomcat 8.5 reached EOL in March 2024.

Upgrading to JDK 17 (LTS) would bring security patches, performance improvements, and modern API access while keeping the migration scope minimal.

Why JDK 17

  • LTS and actively supported: JDK 17 is a Long-Term Support release with free security updates from Adoptium/Temurin through 2026+.
  • JDK 11 is EOL: Adoptium/Temurin ended free builds for JDK 11 in September 2024, making it a poor target for a new migration.
  • No servlet namespace migration: JDK 17 still works with `javax.*` APIs and Tomcat 9 — no `javax` → `jakarta` refactoring needed.
  • Tomcat 8.5 is EOL: Tomcat 9.0.x is actively maintained and supports JDK 17+.
  • Modern APIs: Records, sealed classes, text blocks, pattern matching (preview), `String.repeat()`, `var`, `HttpClient`, `Optional.isEmpty()`, `List.of()`, `Map.of()`, and other quality-of-life improvements.
  • Security: Continued security patches from Adoptium/Temurin and other vendors.

Scope of changes

Area Current Proposed
`pom.xml` compiler plugin `1.8` / `1.8` `17`
`.env` Docker image `TOMCAT_DOCKER_VERSION=8-jre8-openjdk` `TOMCAT_DOCKER_VERSION=9.0-jre17-temurin`
`Dockerfile` `libargon2-0` `libargon2-1` (Ubuntu base image update)
`.github/workflows/test.yml` `java-version: '8'` (build, unit-tests, integration-tests) `java-version: '17'`
`.github/workflows/release.yml` `java-version: '8'` `java-version: '17'`
`.github/workflows/dependency-check.yml` `java-version: 1.8` `java-version: '17'`
`provisioning/install.sh` `openjdk-8-jdk` `openjdk-17-jdk`
`README.md` `openjdk-8-jdk` `openjdk-17-jdk`
`src/setupFiles/shepherdTotalInstall.sh` `java-8-oracle` references `java-17-openjdk`

What this does NOT change

  • No `javax.` → `jakarta.` migration (that would require Tomcat 10+, used with JDK 21)
  • No changes to challenge logic or application behavior
  • No changes to database schemas or MongoDB configuration

Alternatives considered

  • JDK 11: Was previously an LTS candidate but Adoptium/Temurin ended free support in September 2024 — no longer a sensible migration target.
  • JDK 21: Would require Tomcat 10+ and the `javax` → `jakarta` namespace migration — a much larger effort better suited as a separate project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions