Skip to content

Migrate to Java 11 LTS #3962

@Mizux

Description

@Mizux

Currently or-tools is supposedly build against Java 1.8 API but some dependencies (JNA) and others are already using a java 11 as minimum...
note: there is also 17 LTS and 21 LTS out there....
note: when using a java 11 SDK to build a java 8 app you can leak some java 11 symbols

Merely setting the target option does not guarantee that your code actually runs on a JRE with the specified version.[...] or better yet use the release option supported since JDK 9.

ref: https://maven.apache.org/plugins/maven-compiler-plugin/examples/set-compiler-source-and-target.html

Java ecosystem:
2023 java version
ref https://newrelic.com/resources/report/2023-state-of-the-java-ecosystem#most-used-java-versions

we recommend choosing the latest Generally Available LTS version of Java. Java 17 is Generally Available since September 2021

ref: https://cloud.google.com/java/docs/supported-java-versions

Ref:
https://endoflife.date/oracle-jdk (8: 2022-03-31, 11: 2023-09-30, 17: 2026-09-30 (premier support))
https://endoflife.date/amazon-corretto (8: 2026-06-30, 11: 2027-09-01)
https://endoflife.date/azul-zulu (8: 2030-12-31, 11: 2026-09-30)
https://endoflife.date/eclipse-temurin (8: 2026-09-30, 11: 2024-10-31)

Homebrew stable is @21 ~100kDl/m (@17 and @11 ~30kDl/m, @8 4kDl/m)
ref: https://formulae.brew.sh/formula/openjdk#default

Migration dev note:

Test jdeprscan --release 11
https://learn.microsoft.com/en-us/java/openjdk/transition-from-java-8-to-java-11

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions