

Some Scala developers use JDK 11+ for their daily work but do release builds on JDK 8.Īdditionally, you can also run your scala application on GraalVM which is a JVM. Therefore, compiling on 8 may be the safer choice. If you compile on JDK 11+ but have users on JDK 8, additional care is needed to avoid using APIs and features that don’t exist in 8. Since the JVM tends to be backward compatible, it is usually safe to use a newer JVM for running your code, especially if you are not using JVM features designated “experimental” or “unsafe”. We generally recommend JDK 8 or 11 for compiling Scala code. The linked page includes contact information for inquiring about supported and recommended versions. Lightbend offers commercial support for Scala 2. In general, Scala works on JDK 11+, including GraalVM, but it probably won’t take special advantage of features that were added after JDK 8.

(But Scala 2.12+ definitely doesn’t work at all on JDK 6 or 7.) Version compatibility table JDK versionĮven when a version combination isn’t listed as supported, most features may still work. Sometimes new JVM and JDK (Java Development Kit) versions require us to update Scala to remain compatible. (Other supported platforms: Scala.js, Scala Native.) Scala’s primary platform is the Java Virtual Machine (JVM).
