Java 11 LTS
- Contact: jodygarnett
- Tracker: GEOT-7254 Java 11 LTS minimum, dropping Java 8 support
- TLDR: Java 11 LTS minimum, dropping Java 8 support (including documentation and build environment)
- Branch: not yet
The Java 8 LTS runtime environment is, thanks to some heroic efforts, managing to hold onto life much longer than anticipated (2026) – However the Java community is moving on and it is time for GeoTools project to do the same.
It is our goal to track LTS releases (checking Temurin support):
- Java 11 (LTS) - 2018 … at least Oct 2024
- Java 17 (LTS) - 2021 … at least Oct 2027
- Java 21 (LTS) - 2023 …
The GeoTools project is taking this action as many of the dependencies we wish to work with are setting Java 11 LTS as a minimum; and we also wish to plan for downstream web applications migrating to Jakarta (which set’s Java 11 LTS at a minimum).
Removing Java 8 also significantly lowers our testing footprint as the Java 2 plugin system (used by native jai and imageio extensions) was superseded by Java 9 module system.
Things to keep in mind:
- String
isBlank()
can replace.trim().isEmpty()
(PMD check InefficientEmptyStringCheck) - File
writeString()
,readString()
,isSameFile()
References:
- Java 8 vs Java 11
- Java 11: Apache Tomcat 10.1.x
- Jetty 10.x, Java 11 and later, JakartaEE 9
- Later ... Java 17: Spring Framework 6.0, Wicket 10.0
- H2 Planned date for migration to Java 11
- H2GIS 2.0 with H2 2.0 requires Java 11
- geotools-devel email discussion
Choose one of:
- Under Discussion
- In Progress
- Completed
- Rejected,
- Deferred
Voting:
- Andrea Aime:
- Ian Turton:
- Jody Garnett:
- Nuno Oliveira (+1, for 29.0):
- Simone Giannecchini:
- Torben Barsballe:
- Update documentation removing Java 8 instructions, including native jai and imageio install instructions
- Update Jenkins build jobs to use Java 11
- Remove Java 8 from build pom.xml files (for example errorprone8)
- Look at updating PMD rules to sensible Java 11 minimum
Methods isBlank()
, lines()
, repeat(n)
, stripLeading()
, strip()
may be added to our PMD checks:
Before:
if (outputAttribute == null || outputAttribute.trim().isEmpty()) {
After:
if (outputAttribute == null || outputAttribute.isBlank()) {
Before:
List<MapLayer> layers=new ArrayList<>();
After:
var layers=new ArrayList<MapLayer>();