The GeoTools is pleased to announce the release of GeoTools 21.0 our first release with both Java 11 and Java 8 compatibility:
This is a stable release of GeoTools made in conjunction with GeoServer 2.15 and GeoWebCache 1.15.
Release highlights:
- Works with both Java 11 and Java 8
- The image processing operations from JAI-EXT are turned on by default (enabling NODATA support for raster data)
- The combination of app-schema with PostGIS DataStore provides improved OR performance with complex subqueries
- A new command line tool is available to migrate NetCDF H2 indexes to a centralized database
- PostGIS DataStore supports NEAREST spatial predicate
- Improved parsing of NetCDF units
- Equal area function for vector data classification
- CSS Styling has improved its Flat mode making better use of nested rules
- Release notes (21.0 | 21-RC | 21-M0 )
This release works with both Java 11 and Java 8, downstream projects are advised that some imports will need to be fixed when upgrading as classes were repackaged for Java 11 compatibility.
We have worked very hard for this release to work with both Java 11 and Java 8. By hitting this goal we are offering GeoTools users and downstream projects the option of migrating to Java 11 when they are ready.
The GeoTools library is now available for use on the module path, see our
Java 11 Quickstart for an example:
module org.geotools.tutorial.quickstart {
requires java.desktop;
requires org.geotools.main;
requires org.geotools.shapefile;
requires org.geotools.swing;
requires org.geotools.render;
}
Internally GeoTools library includes a MANIFEST.MF entries in each jar providing automatic module names:
Dependency | Upgrade | Automatic Module Name |
gt-opengis | gt-opengis | org.geotools.opengis |
gt-metadata | gt-metadata | org.geotools.metadata |
gt-api | (removed) | |
gt-referencing | gt-referencing | org.geotools.referencing |
gt-main | gt-main | org.geotools.main |
gt-xml | gt-xml | org.geotools.xml |
gt-xml | gt-xml | org.geotools.xml |
gt-main | gt-main | org.geotools.data |
gt-jdbc | gt-jdbc | org.geotools.jdbc |
GeoTools Library Restructure
As part of this work many GeoTools dependencies were updated, and the library was repackaged for use as Java 11 modules. The most significant change is the removal of the gt-api module with its classes being distributed across the other modules.
A key technical requirement for Java 11 compatibility is avoiding having two modules making use of the same package. To avoid this "split-package" error some classes have been moved to different packages.
For additional details see the upgrade instructions in our user guide, or for the complete list the spreadsheet used to coordinate code-sprint activities.
|
Over 400 classes moved! |
Java Roadmap Compatibility
The GeoTools library can now be built with Java 11 or Java 8, due to a technical limitation with the core java class libraries our releases will be built with Java 8 for the widest compatibility.
Oracle has contributed a wide range of technologies to the OpenJDK project which now leads Java 11 roadmap going forward.
Java 11 Provider
|
License
|
Linux
|
macOS
|
Solaris
|
Windows
|
Free Updates
|
Oracle JDK
|
Binary Code License
|
x
|
x
|
x
|
x
|
2019 March
|
Oracle OpenJDK
|
GPL
|
x
|
x
| |
x
|
2019 March
|
RedHat OpenJDK
|
GPL
|
x
| | | |
2024 October
|
Adopt OpenJDK
|
GPL
|
x
|
x
| |
x
|
2022 September
|
While Oracle JDK 8 has reached end-of-life the open source community has responded with extensive
Java 8 support options. RedHat has made a public commitment to contribute fixes to the upstream Java 8 codebase, while a range of organizations are making Java 8 builds available for Windows and macOS users.
Java 8 Provider | License | Linux | macOS | Solaris | Windows | Free Updates |
Oracle JDK | Binary Code License | x | x | x | x | 2019 January |
Oracle OpenJDK | GPL | x | | | | reference only |
Oracle OpenJDK | Binary Code License | x | | | x | reference only |
RedHat OpenJDK | GPL | x | | | | 2023 June |
Adopt OpenJDK | GPL | x | x | | x | 2023 September |
Existing OpenJDK users remain unaffected and can upgrade to Java 11 when ready. If you have been using the public distribution of Oracle JDK 8 we recommend switching to OpenJDK 8 at this time, and planning your migration to Java 11 in the next two years.
About GeoTools 21
GeoTools 21 series: