Wiki source code of Java Support Strategy

Last modified by Vincent Massol on 2024/02/11 18:39

Hide last authors
Vincent Massol 8.2 1 {{box cssClass="floatinginfobox" title="**Contents**"}}
2 {{toc/}}
3 {{/box}}
4
Vincent Massol 1.1 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.
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
Vincent Massol 16.1 15 Terminology:
Vincent Massol 19.3 16 * "source level": This is the Java syntax used in the source of XWiki. From a user point of vue, this can be considered as the minimal Java version that can be used to run XWiki.
Vincent Massol 16.1 17
Vincent Massol 17.1 18 Rules:
Vincent Massol 14.1 19 * 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:
20 ** 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).
21 ** 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).
22 ** Java 25 is out in September 2025
23 ** 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).
24 * As a best effort, we also try to support more recent Java versions whenever we can.
25 ** For example, in XWiki 14.10.x we added support for Java 17
Vincent Massol 6.1 26
Vincent Massol 14.1 27 {{info}}
28 Since Java 17+, you need to have the following Java switches to run XWiki:
29
Vincent Massol 12.1 30 {{code language="none"}}
Vincent Massol 12.2 31 --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 32 {{/code}}
Vincent Massol 14.1 33 {{/info}}
Vincent Massol 12.1 34
Vincent Massol 14.1 35 {{error}}
36 List of issues related to Java 17 & 21:
Vincent Massol 12.1 37
Vincent Massol 6.1 38 {{jira id="xwikiorg" source="jql"}}
Vincent Massol 13.1 39 labels = java AND (environment ~"java 17" or environment ~"java 21") and resolution = Unresolved
Vincent Massol 6.1 40 {{/jira}}
Vincent Massol 14.2 41 {{/error}}
Vincent Massol 1.1 42
Vincent Massol 2.1 43 = By XWiki Versions =
44
Vincent Massol 9.1 45 |=XWiki Versions|=Java Version supported|=Source Level
Vincent Massol 9.2 46 |XWiki < 6.0|Java 6|Java 6
47 |XWiki < 8.1|Java 7|Java 7
48 |XWiki < 11.3|Java 8|Java 8
49 |XWiki >= 11.3|Java 8 & Java 11|Java 8
Vincent Massol 13.1 50 |XWiki >= 14.0 & < 15.3|Java 11|Java 11
Vincent Massol 15.2 51 |XWiki >= 14.10.9/15.3|Java 11 & Java 17|Java 11
Vincent Massol 18.1 52 |XWiki >= 16.0.0|Java 17|Java 17
Vincent Massol 2.1 53
Thomas Mortagne 19.1 54 = Things to do when increasing the minimum supported Java version in the current branch
55
56 * add a row to [[the table above>>||anchor="HByXWikiVersions"]]
57 * update ##<xwiki.java.version>## Maven property in [[xwiki-commons root pom>>https://github.com/xwiki/xwiki-commons/]]
58 * install the new Java version on the release agent
59 * update the automatic switch mapping in the [[release script>>https://github.com/xwiki/xwiki-dev-tools/blob/master/xwiki-release-scripts/maven-release.sh]]
60 * 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