Skip to content

Commit b874190

Browse files
authored
Merge pull request #3215 from scala/jdk25-ga
update JDK compat page for JDK 25 going GA
2 parents 8003014 + cd9d9c1 commit b874190

File tree

1 file changed

+30
-33
lines changed

1 file changed

+30
-33
lines changed

_overviews/jdk-compatibility/overview.md

Lines changed: 30 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,13 @@ Minimum Scala versions:
1414

1515
| JDK | 3 | 3 LTS | 2.13 | 2.12 | 2.11 |
1616
|:-----------:|:--------:|:--------:|:---------:|:---------:|:----------:|
17-
| 25 (ea) | 3.7.1 | 3.3.6 | 2.13.17* | 2.12.21* | |
18-
| 24 | 3.6.4 | 3.3.6 | 2.13.16 | 2.12.21* | |
19-
| 23 | 3.6.2 | 3.3.5 | 2.13.15 | 2.12.20 | |
20-
| 22 | 3.4.0 | 3.3.4 | 2.13.13 | 2.12.19 | |
17+
| 25 (LTS) | 3.7.1 | 3.3.6 | 2.13.17* | 2.12.21* | |
2118
| 21 (LTS) | 3.4.0 | 3.3.1 | 2.13.11 | 2.12.18 | |
2219
| 17 (LTS) | 3.0.0 | 3.3.0 | 2.13.6 | 2.12.15 | |
2320
| 11 (LTS) | 3.0.0 | 3.3.0 | 2.13.0 | 2.12.4 | 2.11.12 |
2421
| 8 (LTS) | 3.0.0 | 3.3.0 | 2.13.0 | 2.12.0 | 2.11.0 |
2522

26-
\* = forthcoming; support available in [nightly builds](https://stackoverflow.com/q/40622878/86485)
23+
\* = forthcoming; support available in [nightly builds](https://docs.scala-lang.org/overviews/core/nightlies.html)
2724

2825
Even when a version combination isn't listed as supported, most features might still work.
2926

@@ -45,26 +42,30 @@ Minimum working versions:
4542

4643
Even when a version combination isn't listed as supported, most features might still work.
4744

45+
We will update this table soon to include information about JDK 25. <!-- TODO -->
46+
4847
Using a different build tool, such as Gradle or Maven? We invite pull
4948
requests adding additional columns to this table.
5049

5150
## Running versus compiling
5251

53-
JDK 8, 11, 17, and 21 are all reasonable choices both for *compiling* and *running* Scala code.
52+
JDK 8, 11, 17, 21, and 25 are all reasonable choices both for *compiling* and *running* Scala code.
5453

5554
Since the JVM is normally backwards compatible, it is usually safe to use a newer JVM for *running* your code than the one it was compiled on, especially if you are not using JVM features designated "experimental" or "unsafe".
5655

5756
JDK 8 remains in use at some shops (as of 2023), but usage is declining and some projects are dropping support. If you compile on JDK 11+ but want to allow your users to stay on 8, additional care is needed to avoid using APIs and features that don't exist in 8. (For this reason, some Scala developers use a newer JDK for their daily work but do release builds on JDK 8.)
5857

58+
As per [this blog post](https://www.scala-lang.org/news/next-scala-lts-jdk.html), Scala 3.8 will have a new minimum JDK version of 17.
59+
5960
## Long Term Support (LTS) versions
6061

6162
After Java 8, Oracle introduced the concept of LTS versions of the JDK. These versions will remain supported (by Oracle, and likely by the rest of the ecosystem, including Scala) for longer than the versions in between. See <https://www.oracle.com/technetwork/java/eol-135779.html>.
6263

63-
JDK 8, 11, 17, and 21 are LTS versions. (The next LTS version will be 25.)
64+
JDK 8, 11, 17, 21, and 25 are LTS versions. (The next LTS version will be 29.)
6465

65-
Scala provides experimental support for running the Scala compiler on non-LTS versions of the JDK. The current LTS versions are normally tested in our CI matrix and by the Scala community build. We may also test non-LTS versions, but any issues found there are considered lower priority, and will not be considered release blockers. (The Scala team at Akka may be able to offer faster resolution of issues like this under commercial support.)
66+
Scala provides experimental support for running the Scala compiler on non-LTS versions of the JDK. The current LTS versions are normally tested in our CI matrix and by the Scala community build. We may also test non-LTS versions, but any issues found there are considered lower priority, and will not be considered release blockers. (The Scala teams at VirtusLab and Akka may be able to offer faster resolution of issues like this under commercial support.)
6667

67-
As already mentioned, Scala code compiled on JDK 8 should run without problems in later JVMs. We will give higher priority to bugs that break this property. (For example, in 2.13.x we might eventually provide support for JPMS module access checks, to ensure your code won't incur `LinkageErrors` due to module access violations.)
68+
As already mentioned, Scala code compiled on JDK 8 should run without problems in later JVMs. We will give higher priority to bugs that break this property. (For example, we might eventually provide support for JPMS module access checks, to ensure your code won't incur `LinkageErrors` due to module access violations.)
6869

6970
## JDK vendors and distributions
7071

@@ -74,7 +75,7 @@ JDK 8 users typically use the Oracle JDK or some flavor of OpenJDK.
7475

7576
Most JDK 11+ users are using OpenJDK, or GraalVM which runs in the context of OpenJDK. GraalVM performs well on the Scala benchmarks, and it benefits from GraalVM runtime and runs faster too.
7677

77-
OpenJDK comes in various flavors, offered by different providers. We build and test Scala using [Temurin](https://adoptium.net) primarily, but the differences are unlikely to matter to most users.
78+
OpenJDK comes in various flavors, offered by different providers. We typically build and test Scala using [Temurin](https://adoptium.net) or [Zulu](https://www.azul.com/downloads/), but the differences are unlikely to matter to most users.
7879

7980
## JDK 11 compatibility notes
8081

@@ -99,7 +100,9 @@ The Scala test suite and Scala community build are green on JDK 17.
99100

100101
For sbt users, sbt 1.6.0-RC1 is the first version to support JDK 17, but in practice sbt 1.5.5 may also work. (It will print a warning on startup about `TrapExit` that you can ignore.)
101102

102-
For possible Scala issues, see the [jdk11](https://github.com/scala/bug/labels/jdk11) and [jdk17](https://github.com/scala/bug/labels/jdk17) labels in the Scala 2 bug tracker.
103+
For possible Scala 3 issues, see the [area:jdk](https://github.com/scala/scala3/labels/area%3Ajdk) and [compat:java](https://github.com/scala/scala3/labels/compat%3Ajava) labels in [the Scala 3 issue tracker](https://github.com/scala/scala3/issues).
104+
105+
For possible Scala 2 issues, see the [jdk11](https://github.com/scala/bug/labels/jdk11) and [jdk17](https://github.com/scala/bug/labels/jdk17) labels in [the Scala 2 bug tracker](https://github.com/scala/bug/issues).
103106

104107
## JDK 21 compatibility notes
105108

@@ -111,34 +114,29 @@ The Scala test suite and Scala 2.13 community build are green on JDK 21.
111114

112115
For sbt users, sbt 1.9.0 is the first version to support JDK 21.
113116

114-
For possible Scala issues, see the [jdk11](https://github.com/scala/bug/labels/jdk11), [jdk17](https://github.com/scala/bug/labels/jdk17), and [jdk21](https://github.com/scala/bug/labels/jdk21) labels in the Scala 2 bug tracker.
115-
116-
## JDK 22 compatibility notes
117-
118-
JDK 22 is non-LTS.
119-
120-
Scala 2.13.13+, 2.12.19+, 3.3.4+, and 3.6.2+ support JDK 22.
121-
122117
For possible Scala 2 issues, see the [jdk11](https://github.com/scala/bug/labels/jdk11), [jdk17](https://github.com/scala/bug/labels/jdk17), and [jdk21](https://github.com/scala/bug/labels/jdk21) labels in the Scala 2 bug tracker.
123118

124-
## JDK 23 compatibility notes
119+
## JDK 25 compatibility notes
125120

126-
JDK 23 is non-LTS.
121+
JDK 25 is an LTS release.
127122

128-
Scala 2.13.15+, Scala 2.12.20+, and Scala 3.6.2+ support JDK 23.
123+
Scala 3.3.6+ and 3.7.1+ support JDK 25.
129124

130-
We are working on adding JDK 23 support to Scala 3.3.x.
131-
(Support may be available in nightly builds and/or release candidates.)
125+
The Scala test suite and Scala 2.13 community build are green on JDK 25.
132126

133-
For possible Scala 2 issues, see the [jdk11](https://github.com/scala/bug/labels/jdk11), [jdk17](https://github.com/scala/bug/labels/jdk17), and [jdk21](https://github.com/scala/bug/labels/jdk21) labels in the Scala 2 bug tracker.
127+
The forthcoming Scala 2.13.17 and 2.12.21 releases will support JDK 25.
128+
Support is already available in [nightlies](https://docs.scala-lang.org/overviews/core/nightlies.html).
134129

135-
## JDK 24 compatibility notes
130+
For information on timing of the forthcoming releases, see:
136131

137-
JDK 24 will be non-LTS.
132+
* https://contributors.scala-lang.org/t/scala-2-13-17-release-planning/6994
133+
* https://contributors.scala-lang.org/t/scala-2-12-21-release-planning/6753
138134

139-
Scala 2.13.16+ supports, and Scala 2.12.21 (forthcoming) will support, JDK 24. We are also working on adding JDK 24 support to Scala 3. (Support may be available in nightly builds and/or release candidates.)
135+
<!-- TODO For sbt users, sbt 1.9.0 is the first version to support JDK 21.-->
140136

141-
For possible Scala 2 issues, see the [jdk11](https://github.com/scala/bug/labels/jdk11), [jdk17](https://github.com/scala/bug/labels/jdk17), and [jdk21](https://github.com/scala/bug/labels/jdk21) labels in the Scala 2 bug tracker.
137+
For possible Scala 3 issues, see the [area:jdk](https://github.com/scala/scala3/labels/area%3Ajdk) and [compat:java](https://github.com/scala/scala3/labels/compat%3Ajava) labels in [the Scala 3 issue tracker](https://github.com/scala/scala3/issues).
138+
139+
For possible Scala 2 issues, see the [jdk11](https://github.com/scala/bug/labels/jdk11), [jdk17](https://github.com/scala/bug/labels/jdk17), [jdk21](https://github.com/scala/bug/labels/jdk21), and [jdk25](https://github.com/scala/bug/labels/jdk25) labels in [the Scala 2 bug tracker](https://github.com/scala/bug/issues).
142140

143141
## GraalVM Native Image compatibility notes
144142

@@ -152,8 +150,7 @@ A few sbt plugins are offering support for GraalVM Native Image compilation:
152150

153151
## Scala 3
154152

155-
At present, both Scala 3 LTS and Scala Next support JDK 8, as well as 11 and beyond.
153+
At present, both Scala 3.3 LTS and Scala Next support JDK 8, as well as 11 and beyond.
156154

157-
As per [this blog post](https://www.scala-lang.org/news/next-scala-lts.html),
158-
a forthcoming Scala 3 LTS version will drop JDK 8 support and may drop
159-
11 as well. Stay tuned.
155+
As per [this blog post](https://www.scala-lang.org/news/next-scala-lts-jdk.html),
156+
Scala 3.8 will have a new minimum JDK version of 17. This can already be tested in Scala 3.8 nightlies.

0 commit comments

Comments
 (0)