Running SmartFoxServer 2X with Java 8

Java 8 has been out for year now and it’s probably the most “radical” release of Java ever. With the new functional/lambda additions it feels almost like a new language.

SmartFoxServer 2.10 fully supports Java 8 but since it comes as a patch it still relies on the previous runtime (Java 7) coming with SFS 2.9

If you’re interested in taking advantage of the new Java 8 features for your server Extension code you can follow these simple steps:

1) Download the JRE 8 from Oracle’s website:
http://www.oracle.com/technetwork/java/ … 33155.html
Making sure to match the architecture of your OS (32 vs 64 bit)

2) Uncompress the download and replace the new jre/ folder under the root of your SmartFoxServer 2X installation. This will overwrite the previous JRE. (This operation is not required under MacOS X)

3) One last step is required for the embedded Jetty server:

Open the SFS2X/lib/jetty/modules/npn/ folder and duplicate one of the files in the folder. Example:
duplicate file “npn-1.7.0_45.mod” and rename it so that the version number matches the new JRE.¬†For instance: if you have downloaded JRE 1.8.0_25 the file will be renames as –> “npn-1.8.0_25.mod”

You’re ready to run SFS2X with Java 8