google / google/or-tools

Migrate to Java 11 LTS

Open
#3,962 0 comments 0 reactions 1 assignee Claimed by @Mizux View on GitHub
Feature Request Lang: Java OS: Linux OS: Mac OS: Windows
Dominant language
C++
Stars
14.1k
Forks
2.5k
Avg merge
8h 39m
Merged PRs (30d)
72

Description

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](https://newrelic.com/sites/default/files/2023-04/Java-long-term-version.png)
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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.