Wiki source code of Java Support Strategy

Last modified by Thomas Mortagne on 2026/01/20 13:53

Hide last authors
Vincent Massol 8.2 1 {{box cssClass="floatinginfobox" title="**Contents**"}}
2 {{toc/}}
3 {{/box}}
4
Michael Hamann 20.2 5 There are lots of Java versions out there and supporting all of them is just too hard to be done in a quality manner. Thus, we only support a subset.
Vincent Massol 1.1 6
7 By "supported versions" we mean:
8
Vincent Massol 3.1 9 * XWiki runs fine on that Java version.
Vincent Massol 1.1 10 * Issues created for these versions of Java in JIRA are not closed as won't fix and we make a best effort to fix them.
11 * We include these versions in our tests (be them automated or manual).
12
13 = Supported Java Versions =
14
Thomas Mortagne 21.1 15 == By XWiki Versions ==
16
Thomas Mortagne 22.1 17 Terminology:
18
19 * "source level": This is the Java syntax used in the source of XWiki. From a user point of view, this can be considered as the minimal Java version that can be used to run XWiki.
20
Thomas Mortagne 21.1 21 |=XWiki Versions|=Java Version supported|=Source Level
22 |XWiki < 6.0|Java 6|Java 6
23 |XWiki < 8.1|Java 7|Java 7
24 |XWiki < 11.3|Java 8|Java 8
Thomas Mortagne 31.1 25 |XWiki >= 11.3|Java 8 and 11|Java 8
Thomas Mortagne 21.1 26 |XWiki >= 14.0 & < 15.3|Java 11|Java 11
Thomas Mortagne 30.1 27 |XWiki >= 14.10.9/15.3|Java 11 and 17|Java 11
28 |XWiki >= 16.0.0|Java 17 and 21|Java 17
Thomas Mortagne 34.1 29 |XWiki >= 17.10.1|Java 17 and 21|Java 17
30 |XWiki >= 17.10.3|Java 17, 21 and 25|Java 17
Thomas Mortagne 30.1 31 |XWiki >= 18.0.0|Java 21 and 25|Java 21
Thomas Mortagne 21.1 32
Vincent Massol 14.1 33 {{info}}
34 Since Java 17+, you need to have the following Java switches to run XWiki:
35
Vincent Massol 12.1 36 {{code language="none"}}
Vincent Massol 12.2 37 --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.util.concurrent=ALL-UNNAMED
Vincent Massol 12.1 38 {{/code}}
Vincent Massol 14.1 39 {{/info}}
Vincent Massol 12.1 40
Vincent Massol 14.1 41 {{error}}
Thomas Mortagne 33.1 42 List of issues related to Java support:
Vincent Massol 12.1 43
Thomas Mortagne 29.2 44 {{jira id="xwikiorg" source="jql" fields="priority, type, status, key, summary"}}
Thomas Mortagne 32.1 45 labels = java and resolution = Unresolved ORDER BY priority
Vincent Massol 6.1 46 {{/jira}}
Vincent Massol 14.2 47 {{/error}}
Vincent Massol 1.1 48
Thomas Mortagne 23.1 49 == Rules ==
Vincent Massol 2.1 50
Thomas Mortagne 23.1 51 * As a general rule we follow the Java LTS release cadence (currently every 2 years), which means that at the beginning of every 2 XWiki cycles, we drop the oldest Java version that we were supporting and start supporting the latest Java LTS (and at the source level we upgrade it by one version too). Examples:
52 ** In XWiki 16.0 (2024), we drop the support of Java 11, continue to support Java 17 (which becomes the new source level), and work as fast as possible to support Java 21 in 16.x. We continue to support Java 11 & 17 for XWiki 15.10.x (XWiki LTS).
53 ** In XWiki 17.0 (2025), we continue to support Java 17 & 21. We also continue to support Java 17 & 21 for XWiki 16.10.x (XWiki LTS).
54 ** Java 25 is out in September 2025
55 ** In XWiki 18.0 (2026), we drop support for Java 17, continue to support Java 21 (which becomes the new source level), and add support for Java 25 as soon as possible for 18.x. We continue to support Java 17 & 21 for XWiki 17.10.x (XWiki LTS).
56 * As a best effort, we also try to support more recent Java versions whenever we can.
57 ** For example, in XWiki 14.10.x we added support for Java 17
Vincent Massol 2.1 58
Michael Hamann 20.2 59 = Things to do when increasing the minimum supported Java version in the current branch =
Thomas Mortagne 19.1 60
61 * add a row to [[the table above>>||anchor="HByXWikiVersions"]]
62 * update ##<xwiki.java.version>## Maven property in [[xwiki-commons root pom>>https://github.com/xwiki/xwiki-commons/]]
Thomas Mortagne 24.1 63 * install the new Java version on [[the release agent>>https://github.com/xwiki/xwiki-docker-build/blob/master/build/Dockerfile]] (and also check the version of the jenkins image while you are at it)
Thomas Mortagne 19.1 64 * update the automatic switch mapping in the [[release script>>https://github.com/xwiki/xwiki-dev-tools/blob/master/xwiki-release-scripts/maven-release.sh]]
65 * update the automatic java version switch mapping in the [[Jenkins pipeline>>https://github.com/xwiki/xwiki-jenkins-pipeline/blob/master/vars/configureJavaTool.groovy]]

Get Connected