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
For more information on Java 11 (and 9 and 10), see [below](#jdk-11-compatibility-notes).
26
-
27
26
## Running versus compiling
28
27
29
28
We recommend using Java 8 for *compiling* Scala code. Since the JVM is backward compatible, it is usually safe to use a newer JVM to *run* your code compiled by the Scala compiler for older JVM versions. There are notable exceptions with experimental/unsafe features, and the introduction of the module system in Java 9. The Scala compiler does usually need updates to run properly on newer versions of the JVM, so make sure to use the appropriate JVM when compiling your code.
@@ -48,4 +47,31 @@ As of Scala 2.12.8 and 2.11.12, **JDK 11 support is incomplete**. Notably, `scal
48
47
49
48
JDK 11 support requires minimum sbt version 1.1.0, or 0.13.17 in the 0.13.x series.
50
49
51
-
For more information on JDK 11 compatibility, watch the ["Support JDK 11"](https://github.com/scala/scala-dev/issues/139"scala/scala-dev #139") issue on GitHub. To help with testing on Java 11, see [scala/scala-dev#559](https://github.com/scala/scala-dev/issues/559).
50
+
To track progress on JDK 11 compatibility, watch:
51
+
52
+
* the ["Support JDK 11"](https://github.com/scala/scala-dev/issues/139"scala/scala-dev #139") issue
53
+
* the [jdk11 label](https://github.com/scala/bug/labels/jdk11) in scala/bug
54
+
55
+
To help with testing on JDK 11, see [scala/scala-dev#559](https://github.com/scala/scala-dev/issues/559).
56
+
57
+
## JDK 12 compatibility notes
58
+
59
+
As of February 2019, JDK 12 is not in full release, but early-access builds are available. Note that even the final JDK 12 release will not be an LTS release, so the remarks above about non-LTS releases apply.
60
+
61
+
Scala has not yet been extensively tested on JDK 12.
62
+
63
+
However, the Scala 2.12 community build is [up and running](https://scala-ci.typesafe.com/view/scala-2.12.x/job/scala-2.12.x-jdk12-integrate-community-build/) on an early-access JDK 12 build, and most projects are green.
64
+
65
+
Two significant known issues with Scala 2.12.8 on JDK 12 are:
66
+
67
+
* the `-release` flag doesn't work ([scala/bug#11403](https://github.com/scala/bug/issues/11403))
68
+
* the optimizer doesn't work ([scala/bug#11372](https://github.com/scala/bug/issues/11372))
69
+
70
+
Both issues have already been fixed. The fixes will be included in [Scala 2.12.9](https://github.com/scala/scala/milestone/77). A release date for 2.12.9 has not been set. In the meantime, consider using a [Scala nightly build](https://stackoverflow.com/questions/40622878/how-do-i-tell-sbt-to-use-a-nightly-build-of-scala-2-12-or-2-13) to test the fixes.
71
+
72
+
In other respects, so far it appears that 12 is similar to 11 with respect to Scala compatibility.
73
+
74
+
To track progress on JDK 12 compatibility, watch:
75
+
76
+
* the [jdk12 label](https://github.com/scala/bug/labels/jdk12) in scala/bug (as well as the [jdk11 label](https://github.com/scala/bug/labels/jdk11))
77
+
* the JDK 11 and 12 community build ticket ([scala/community-builds#796](https://github.com/scala/community-builds/issues/796))
0 commit comments