Skip to content

Commit e36376e

Browse files
committed
Java 17 docs updates
1 parent c70ceb7 commit e36376e

File tree

8 files changed

+148
-53
lines changed

8 files changed

+148
-53
lines changed

RELEASE_NOTES.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
GeoWebCache 1.28-SNAPSHOT (2025-04-03)
22
--------------------------------------
33

4-
<Release Description>
4+
Stable release, GeoNetwork 1.28.0 is the first release requiring a Java 17 environment.
55

66
Improvements:
77
+++++++++++++
8-
- <New feature>
8+
- Java 17 minimum
99

1010
Fixes:
1111
++++++
1212
- <Bug fix>
1313

14+
Updates:
15+
++++++++
16+
17+
- Upgrade to GeoTools 34.x
1418

1519
GeoWebCache 1.27.0 (2025-04-02)
1620
------------------------------

documentation/en/build.xml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949

5050
<target name="docs"
5151
description="Generate html documentation">
52+
<antcall target="sphinx-init"/>
5253

5354
<mkdir dir="${build.directory}"/>
5455
<antcall target="sphinx">
@@ -72,13 +73,26 @@
7273

7374
<target name="site"
7475
description="Generate html documentation">
76+
<antcall target="autobuild-init"/>
77+
7578

7679
<mkdir dir="${build.directory}"/>
7780
<antcall target="autobuild">
7881
<param name="id" value="user" />
7982
</antcall>
8083
</target>
8184

85+
<target name="sphinx-init" unless="sphinx.available">
86+
<local name="message"/>
87+
<property name="message" value="sphinx-build not available:${line.separator}
88+
${line.separator}
89+
virtualenv venv${line.separator}
90+
source venv/bin/activate${line.separator}
91+
pip install -r requirements.txt${line.separator}
92+
"/>
93+
<fail message="${message}"/>
94+
</target>
95+
8296
<target name="sphinx" if="sphinx.available">
8397
<local name="argLine"/>
8498
<property name="argLine" value="-D release=${project.version} -q -W --keep-going -b html -d &quot;${build.directory}/user/doctrees&quot; . &quot;${build.directory}/user/html&quot;"/>
@@ -88,6 +102,16 @@
88102
</exec>
89103
</target>
90104

105+
<target name="autobuild-init" unless="autobuild.available">
106+
<local name="message"/>
107+
<property name="message" value="autobuild not available:${line.separator}
108+
${line.separator}
109+
virtualenv venv${line.separator}
110+
source venv/bin/activate${line.separator}
111+
pip install -r requirements.txt${line.separator}
112+
"/>
113+
<fail message="${message}"/>
114+
</target>
91115

92116
<target name="autobuild" if="autobuild.available">
93117
<local name="argLine"/>

documentation/en/user/source/development/index.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ You are encouraged to help contribute code to GeoWebCache. To do so, you will f
77

88
This is the current prerequisites:
99

10-
* Java 8 (`OpenJDK <http://openjdk.java.net>`__ linux, `OpenJDK Temurin 8 <https://adoptium.net/?variant=openjdk8&jvmVariant=hotspot>` windows and macOS installers)
11-
* `Maven <http://maven.apache.org/>`_
12-
* `Git <http://git-scm.com>`_
10+
* Java 17 (`OpenJDK <https://openjdk.java.net>`__ linux, `OpenJDK Temurin 17 <https://adoptium.net/temurin/releases/?variant=openjdk8&jvmVariant=hotspot&os=any&arch=any&version=17>` windows and macOS installers)
11+
* `Maven <https://maven.apache.org/>`_
12+
* `Git <https://git-scm.com>`_
1313

14-
Please make sure you use **Java 8** to compile to ensure that we don't accidentally use new features only available in Java 11.
14+
Please make sure you use **Java 17** to compile to ensure that we don't accidentally use new features only available in Java 21.
1515

1616
You are encouraged to join the `GeoWebCache Developers mailing list <https://lists.sourceforge.net/lists/listinfo/geowebcache-devel>`__ to discuss your work. It is always a good idea to ask whether anyone else has already solved the same problem.
1717

@@ -27,28 +27,28 @@ Setting Up
2727

2828
.. code-block:: bash
2929
30-
set JAVA_HOME=c:\Program Files\Temurin\jdk8u322-b06
30+
set JAVA_HOME=c:\Program Files\Temurin\jdk-17.0.15_6
3131
3232
Linux/OS X:
3333

3434
.. code-block:: bash
3535
36-
export JAVA_HOME=/opt/jdk1.7.0_79
36+
export JAVA_HOME=/opt/jdk-17.0.15_6
3737
38-
#. You can download maven from http://maven.apache.org/download.html, unpack and include the :file:`bin` directory in your PATH variable.
38+
#. You can download maven from https://maven.apache.org/download.html, unpack and include the :file:`bin` directory in your PATH variable.
3939

4040
Windows:
4141

4242
.. code-block:: bash
4343
44-
set M2_HOME = C:\java\apache-maven-3.8.5
44+
set M2_HOME = C:\java\apache-maven-33.9.5
4545
set PATH=%PATH%;%M2_HOME%\bin;%JAVA_HOME%\bin
4646
4747
Linux:
4848

4949
.. code-block:: bash
5050
51-
export M2_HOME = ~/java/apache-maven-3.8.5
51+
export M2_HOME = ~/java/apache-maven-3.9.5
5252
export PATH=$PATH:$M2_HOME/bin:$JAVA_HOME/bin
5353
5454
For more detail instructions on maven see the `download page <http://maven.apache.org/download.cgi>`_.

documentation/en/user/source/installation/index.rst

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,16 @@
33
Installation
44
============
55

6-
This section describes how to install GeoWebCache on the most common platforms. GeoWebCache will work on any operating system that supports Java 1.5, including FreeBSD and Solaris.
6+
This section describes how to install GeoWebCache, which will work on any operating system that supports Java 17.
77

88
The following software will need to be set up prior to installing GeoWebCache:
99

10-
* **Java Runtime Environment (JRE)** (version 1.5 or greater, preferably from Oracle)
11-
* **Java Servlet Container** (such as Apache Tomcat)
10+
* **Java Runtime Environment (JRE)** (version 17 or 21)
11+
* **Java Servlet Container** (such as Apache Tomcat or Jetty)
1212

13-
In essence, GeoWebCache is a set of Java classes (program files) and a number of configuration files. The combination is known as a Java Servlet, and these are commonly distributed in a zip file known as a Web ARchive, or WAR file for short.
14-
15-
To use its content, we need a Java Virtual Machine and a Servlet Container. The latter is a network service that accepts requests from clients, such as web browsers, and delegates them to the appropriate servlet.
13+
In essence, GeoWebCache is web application consisting of Java classes (program files) and a number of configuration files. The combination is known as a Java Servlet, and these are commonly distributed in a zip file known as a Web ARchive, or WAR file for short.
1614

15+
To run this web application, we need both a Java Runtime Environment (responsible for running the Java program files) and Servlet Container (that accepts HTTPS requests from clients, such as web browsers, and delegates them to the GeoWebCache).
1716

1817
.. toctree::
1918
:maxdepth: 2

documentation/en/user/source/installation/prerequisites/linux.rst

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,41 @@
33
Linux
44
=====
55

6-
Due to licensing issues, many Linux distributions come with a variety of Java environments. Additionally, to minimize the chance of a security breach with default settings, most versions of Tomcat are configured to not allow access to the file system. Therefore, it is highly recommended to follow these instructions, even if you already have a servlet container set up.
6+
Many linux distirbutions provide their own distirbution of OpenJDK, or you may install your own from OpenJDK or Adoptium (as recommended below).
77

8-
Java Runtime Environment
9-
------------------------
8+
Caution is required before considering your Linux distirbution of Apache Tomcat:
9+
10+
* Packaage manager may recommend or udpate to Apache Tomcat 10 or newer (which is not supported by GeoWebCache).
11+
* Tomcat may be configured, in the interests of security, to restrict access to the local file system.
1012

11-
In your browser, navigate to `<http://www.java.com/en/download/manual.jsp>`_, and download the latest JRE (SE is fine; you do not need FX or EE). Make sure to select **Linux_x64** if you are running on an x86_64 kernel. Take note of where you saved the file. (This document will assume the file is saved in ``/home/user/Download/`` and is named ``jre16.bin`` although the file name will likely be different.)
13+
We recommend providing your own environment as outlined below.
1214

13-
Next, open a shell and switch to superuser. Depending on your distribution, type ``sudo su`` or just ``su``. Then, ``cd /opt`` and run the command ``sh /home/user/Download/jre1.6.bin>``. This should install Java into /opt. If you receive the message ``ELF not found``, it probably means you need to get the ``Linux`` (i586) version instead of ``Linux_64``.
15+
Java Runtime Environment
16+
------------------------
1417

18+
Make sure you have a Java Runtime Environment (JRE) installed on your system. GeoWebCache requires a Java 17 or Java 21 environment, available from `OpenJDK <https://openjdk.java.net/>`__, `Adoptium <https://adoptium.net/>`_, or provided by your OS distribution.
19+
20+
============ ================= ================ ================ ==================
21+
Java Initial Required Final Tested
22+
============ ================= ================ ================ ==================
23+
Java 21 LTS GeoWebCache 1.25 OpenJDK
24+
Java 17 LTS GeoWebCache 1.22 GeoWebCache 1.28 OpenJDK
25+
Java 11 LTS GeoWebCache 1.15 GeoWebCache 1.22 GeoWebCache 1.27 OpenJDK
26+
Java 8 LTS GeoWebCache 1.9 GeoWebCache 1.9 GeoWebCache 1.22 Oracle and OpenJDK
27+
============ ================= ================ ================ ==================
28+
1529
Apache Tomcat
1630
-------------
1731

18-
Back in your browser, navigate to `<http://tomcat.apache.org>`_, find the **Tomcat 6.x** link in the **Downloads** section, and save the ``tar.gz`` file listed under **Binary Distributions / Core**. Back in your superuser shell, unpack this file as well by running ``tar xzvf /home/user/Download/apache-tomcat-a.b.c.tar.gz>`` (Make sure to use the correct file name.)
32+
Back in your browser, navigate to `<https://tomcat.apache.org>`_, find the **Tomcat 9.x** link in the **Downloads** section, and save the ``tar.gz`` file listed under **Binary Distributions / Core**. Back in your superuser shell, unpack this file as well by running ``tar xzvf /home/user/Download/apache-tomcat-9.0.106.tar.gz>`` (Make sure to use match the version numbers you downloaded name.)
1933

2034
Set the owner of the extracted directory to be your user account: ``chown <user> apache-tomcat-a.b.c``.
2135

22-
Using your favorite text editor, open ``/opt/apache-tomcat-a.b.c/bin/catalina.sh``. Because we don't want to worry about system-wide settings, we will make our changes in the top of this file. Find the line that starts with ``# OS specific support`` (around line 81), and insert the following right before, making sure to input the correct path to your JRE::
36+
Using your favorite text editor, open ``/opt/apache-tomcat-9.0.106/bin/catalina.sh``. Because we don't want to worry about system-wide settings, we will make our changes in the top of this file. Find the line that starts with ``# OS specific support`` (around line 81), and insert the following right before, making sure to input the correct path to your JRE:
37+
38+
.. code-block:: bash
2339
24-
export PATH="/opt/jre1.6/bin:$PATH"
40+
export PATH="/opt/jdk-17.0.15_6/bin:$PATH"
2541
JAVA_OPTS="-server -Xmx256M"
2642
2743
The first line sets the the JRE just installed is the one that Tomcat uses. The second line tells Tomcat to run with server settings and to use 256MB for heap memory. (It may be possible to run with less heap memory, but this is no recommended.) On big installations you will want to use 1024MB or more. Note that this resource is shared among all servlets running in the container, so if you add more servlets later you may have to adjust this number.
@@ -31,7 +47,7 @@ Access Control
3147

3248
If you wish to use Tomcat's web administration tool, you will need to create an account for the administrator.
3349

34-
Open ``/opt/apache-tomcat-a.b.c/conf/tomcat-users.xml`` in a text editor. Immediately after the line containing ``<tomcat-users>``, insert::
50+
Open ``/opt/apache-tomcat-9.0.106/conf/tomcat-users.xml`` in a text editor. Immediately after the line containing ``<tomcat-users>``, insert::
3551

3652
<role rolename="manager"/>
3753
<user username="tomcat" password="s3cret" roles="manager"/>
@@ -42,7 +58,7 @@ Controlling Tomcat
4258
------------------
4359

4460
Running as your own user, you should be able to start and stop Tomcat by using the scripts
45-
``/opt/apache-tomcat-a.b.c/bin/startup.sh`` and ``/opt/apache-tomcat-a.b.c/bin/shutdown.sh``
61+
``/opt/apache-tomcat-9.0.106/bin/startup.sh`` and ``/opt/apache-tomcat-a.b.c/bin/shutdown.sh``
4662

4763
Verify Tomcat is running by navigating to to http://localhost:8080 (the default location of the Tomcat web interface). If Tomcat is running correctly, you should see a page congratulating you on a successful installation.
4864

documentation/en/user/source/installation/prerequisites/macosx.rst

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,48 @@
33
MacOS X
44
=======
55

6-
TODO, please contribute
6+
MacOS has a number of command line package managers for open source components. We recommend using `SDKMAN! <https://sdkman.io/>`_ to manage Java and Tomcat environment.
77

8+
Java
9+
^^^^^
10+
11+
* Required: Java Development Kit 17 (JDK 17)
12+
13+
Open JDK:
14+
15+
https://adoptium.net/temurin/releases/?version=17 Temurin 17 (LTS) - Recommended
16+
17+
* SDKMan!
18+
19+
.. code-block:: bash
20+
21+
# list to determine latest Temurin JDK 17
22+
sdk list java 17
23+
24+
# Installing latest Temurin JDK 17 shown above
25+
sdk install java 17.0.15-tem
26+
27+
# Select Java for use
28+
sdk use java 17<tab>
29+
30+
Apache Tomcat
31+
^^^^^^^^^^^^^
32+
33+
GeoWebCache requires Apache Tomcat 9 required for JavaEE environment.
34+
35+
*
36+
37+
* SDKMan!
38+
39+
.. code-block:: bash
40+
41+
# list to determine latest Apache Tomcat 9
42+
sdk list tomcat 9
43+
44+
# Installing latest Tomcat 9 shown above
45+
sdk install tomcat 9.0.102
46+
47+
# Select tomcat for use
48+
sdk use tomcat 9.0.102
49+
50+
GeoWebCache is not compatible with Apache Tomcat 10 JakarataEE environment.

documentation/en/user/source/installation/prerequisites/windows.rst

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,40 @@ Windows
66
Java Runtime Environment
77
------------------------
88

9-
In your browser, navigate to `<http://www.java.com/en/download/manual.jsp>`_, and download the latest JRE (SE is fine; you do not need FX or EE). You can use either the Online or Offline installer.
9+
1. Download an OpenJDK release for your platform:
10+
11+
* https://adoptium.net/temurin/releases/?version=11 Temurin 11 (LTS) (Recommended)
12+
13+
2. Choose the options to:
14+
15+
* Updating the JAVA_HOME environment variable
16+
* Add the installation to the PATH environment variable
1017

1118
Apache Tomcat
1219
-------------
1320

14-
Back in your browser, navigate to `<http://tomcat.apache.org>`_, find the **Tomcat 6.x** link in the **Downloads** section, and save the ``Windows Service Installer`` file listed under **Binary Distributions / Core**. Run this application to install Tomcat as a Windows service. After installing, you should have a small system tray icon. You can right click on it to ensure that it is running with the latest version of Java, and assign at least 256MB of heap memory. Note that this resource is shared among all servlets running in the container, so if you add more servlets later you may have to adjust this number.
21+
1. Navigate to `<https://tomcat.apache.org>`_, find the **Tomcat 9.x** link in the **Downloads** section, and save the ``Windows Service Installer`` file listed under **Binary Distributions / Core**.
22+
23+
* Tomcat 9 Required: GeoWebCache uses the JavaEE environment last supported in Tomcat 9.
24+
25+
* Tomcat 10 Unsupported: GeoWebCache is not yet compatibile with the JakartaEE environment used by Tomcat 10 and newer.
26+
2. Run this application to install Tomcat as a Windows service.
27+
28+
After installing, use the small system tray icon. You can right click on it to ensure that it is running with the latest version of Java, and assign at least 256MB of heap memory.
29+
30+
Note that this resource is shared among all servlets running in the container, so if you add more servlets later you may have to adjust this number.
1531

1632
Access Control
1733
--------------
1834

1935
If you wish to use Tomcat's web administration tool, you will need to create an account for the administrator.
2036

21-
Do this by opening the conf\tomcat-users.xml`` file in from your Tomcat Program Files directory (by default ``C:\Program Files\Apache Software Foundation\Tomcat a.b`` in a text editor. Immediately after ``<tomcat-users>`` insert::
37+
Do this by opening the :file:`conf\tomcat-users.xml` file in from your Tomcat Program Files directory (by default ``C:\Program Files\Apache Software Foundation\Tomcat 9.0`` in a text editor. Immediately after ``<tomcat-users>`` insert:
38+
39+
.. code-block:: xml
2240
23-
<role rolename="manager"/>
24-
<user username="tomcat" password="s3cret" roles="manager"/>
41+
<role rolename="manager"/>
42+
<user username="tomcat" password="s3cret" roles="manager"/>
2543
2644
Replace ``s3cret`` with your actual password. After making this change you will have to restart Tomcat.
2745

documentation/en/user/source/production/index.rst

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,22 @@
33
Production
44
==========
55

6-
This section is a work in progress, and will eventually be extended to cover topics such as:
7-
8-
* Service architecture
9-
* Apache Portable Runtime
10-
* Java Advanced Imaging / ImageIO
11-
* External tools for optimizing tiles
12-
* Profiling
13-
* Links for tips on improving WMS performance
6+
While many optimizations are configured for GeoWebCache by default, here are some additional considerations when operating in a production enviornment..
147

158
Operating Environment
169
---------------------
1710

1811
Java Settings
1912
+++++++++++++
2013

21-
GeoWebCache speed depends in part on the chosen Java Runtime Environment (JRE). GeoWebCache is tested with both OpenJDK 8 and OpenJDK 11. JREs other than these may work correctly, but are not tested nor supported.
14+
GeoWebCache speed depends in part on the chosen Java Runtime Environment (JRE). GeoWebCache is compiled for Java 17, and is tested with both OpenJDK 17 and OpenJDK 11. JREs other than these may work correctly, but are not tested nor supported.
2215

2316
GeoWebCache does not need a lot of heap memory assigned to the JVM. Usually 512M is just fine if its the only web application running on the servlet container.
2417

2518
Java Advanced Imaging / ImageIO
2619
+++++++++++++++++++++++++++++++
2720

28-
GeoWebCache uses the Java Advanced Imaging library (for image processing) and ImageIO for image encoding/decoding.
29-
30-
The Java 8 plugin system offered native code additions for these two libraries. We no longer recommend use of these plugins due improvements in JIT performance, and native code posing a risk to system stability.
21+
GeoWebCache uses the Java Advanced Imaging library (for image processing) and ImageIO for image encoding/decoding.
3122

3223
Servlet container settings
3324
++++++++++++++++++++++++++
@@ -90,18 +81,18 @@ As of version 1.2.5, it is possible to control how GWC behaves in the event that
9081
* ``GWC_SEED_RETRY_WAIT`` : specifies how much to wait before each retry upon a failure to seed a tile, in milliseconds. Defaults to ``100ms``
9182
* ``GWC_SEED_ABORT_LIMIT`` : specifies the aggregated number of failures that a group of seeding threads should reach before aborting the seeding operation as a whole. This value is shared by all the threads launched as a single thread group; so if the value is ``10`` and you launch a seed task with four threads, when ``10`` failures are reached by all or any of those four threads the four threads will abort the seeding task. The default is ``1000``.
9283

93-
These environment variables can be established by any of the following ways, in order of precedence:
84+
These applicaiton properties can be established by any of the following ways, in order of precedence:
9485

9586
- As a Java environment variable: for example `java -DGWC_SEED_RETRY_COUNT=5 ...`
9687
- As a Servlet context parameter in the web application's ``WEB-INF/web.xml`` configuration file. for example:
9788

98-
.. code-block:: xml
99-
100-
<context-param>
101-
<!-- milliseconds between each retry upon a backend request failure -->
102-
<param-name>GWC_SEED_RETRY_WAIT</param-name>
103-
<param-value>500</param-value>
104-
</context-param>
89+
.. code-block:: xml
90+
91+
<context-param>
92+
<!-- milliseconds between each retry upon a backend request failure -->
93+
<param-name>GWC_SEED_RETRY_WAIT</param-name>
94+
<param-value>500</param-value>
95+
</context-param>
10596
10697
- As a System environment variable: `export GWC_SEED_ABORT_LIMIT=2000; <your usual command to run GWC here>` (or for Tomcat, use the Tomcat's `CATALINA_OPTS` in Tomcat's `bin/catalina.sh` as this: `CATALINA_OPTS="GWC_SEED_ABORT_LIMIT=2000 GWC_SEED_RETRY_COUNT=2`
10798

0 commit comments

Comments
 (0)