You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
\* = 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)
27
24
28
25
Even when a version combination isn't listed as supported, most features might still work.
29
26
@@ -45,26 +42,30 @@ Minimum working versions:
45
42
46
43
Even when a version combination isn't listed as supported, most features might still work.
47
44
45
+
We will update this table soon to include information about JDK 25. <!-- TODO -->
46
+
48
47
Using a different build tool, such as Gradle or Maven? We invite pull
49
48
requests adding additional columns to this table.
50
49
51
50
## Running versus compiling
52
51
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.
54
53
55
54
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".
56
55
57
56
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.)
58
57
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
+
59
60
## Long Term Support (LTS) versions
60
61
61
62
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>.
62
63
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.)
64
65
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.)
66
67
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.)
68
69
69
70
## JDK vendors and distributions
70
71
@@ -74,7 +75,7 @@ JDK 8 users typically use the Oracle JDK or some flavor of OpenJDK.
74
75
75
76
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.
76
77
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.
78
79
79
80
## JDK 11 compatibility notes
80
81
@@ -99,7 +100,9 @@ The Scala test suite and Scala community build are green on JDK 17.
99
100
100
101
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.)
101
102
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).
103
106
104
107
## JDK 21 compatibility notes
105
108
@@ -111,34 +114,29 @@ The Scala test suite and Scala 2.13 community build are green on JDK 21.
111
114
112
115
For sbt users, sbt 1.9.0 is the first version to support JDK 21.
113
116
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
-
122
117
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.
123
118
124
-
## JDK 23 compatibility notes
119
+
## JDK 25 compatibility notes
125
120
126
-
JDK 23 is non-LTS.
121
+
JDK 25 is an LTS release.
127
122
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.
129
124
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.
132
126
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).
134
129
135
-
## JDK 24 compatibility notes
130
+
For information on timing of the forthcoming releases, see:
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.-->
140
136
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).
142
140
143
141
## GraalVM Native Image compatibility notes
144
142
@@ -152,8 +150,7 @@ A few sbt plugins are offering support for GraalVM Native Image compilation:
152
150
153
151
## Scala 3
154
152
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.
156
154
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