• Examples (iOS)
• Examples (Java/Android)
• Examples (C++)
Server API Documentation


» Java Runtime (JRE) Compatibility

At the time of writing this article (September 2021) SmartFoxServer 2X ships with an embedded 64-bit JRE-8, allowing to run the server without the need of external dependencies.

SFS2X can also run with a range of alternative Java runtimes, including more recent versions and from different vendors. In this short guide we provide a map of which JREs can be used and the process to replace the default runtime.

JDK Logos

» Supported vendors

We have tested SmartFoxServer 2X with different Java Runtimes from multiple vendors and we can recommend the following:

The embedded JRE-8 provided in SmartFoxServer 2X is an AdoptJDK distribution. They offer a wide range of pre-built JREs/JDKs supporting all platform and architectures (ARM included) and they are our current go-to provider.

» Supported Java versions

If you need to deploy Java code that relies on a more recent JDK release you can refer to the following compatibility table.

NOTE: keep in mind that since the introduction of the 6 months release cycle, Java will get a new update twice a year. However only LTS releases get security and fix updates for several years after launch, while non-LTS versions are technically supported for 6 months only.
JDK Version End of free updates Supported
JDK 8 (LTS) 2026 for AdoptJDK / Corretto, 2030 for Oracle / OpenJDK YES
JDK 9 March 2018 YES
JDK 10 September 2018 YES
JDK 11 (LTS) 2024 for AdoptJDK, 2027 Corretto YES
JDK 12 September 2019 YES
JDK 13 March 2020 YES
JDK 14 September 2020 YES
JDK 15 March 2021 YES(*)
JDK 16 September 2021 YES(**)

Unless you're bound to specific JDK versions we highly recommend sticking with an LTE release.

(*) = Java 15 drops support for the Nashorn Javascript engine, so it's no longer possible to run JS Extensions.

(**) = SFS2X will not run out of the box with Java 16. You need to add a --illegal-access=permit in the launch scripts, to enable the legacy Reflection API.

Further Java Release details

For a more detailed list of the changes in each Java release we highly recommend this Wikipedia summary.

» Replacing the default Java Runtime

To replace the default JRE with a new one you can follow these simple steps:
macOS users only: the location of the JRE is different from Windows and Linux. The default Java runtime is located under SmartFoxServer_2X/ in the .install4j/jre.bundle/Contents/Home/ folder.