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 step is not required for 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. Example if you have downloaded JRE 1.8.0_25 the file will be renames as --> "npn-1.8.0_25.mod"

You're right, the Mac is an exception because it's the only OS that comes with a pre-installed JDK.In order to run SFS2X with Java 8 under OSX you just need to install the JDK8 on your Mac. You can skip step #2.

I've recently installed Java 8, and in terminal Java -version gives java 1.8.0_u45. However when I tried to run the server with the new package built with eclipse in 1.8 compiler, I got a version problem, which disappeared when I disabled the extension that is built in 1.8.

Is there a way to check the Java version that SFS is using?

Edit: somehow it fixed itself! Not exactly sure what I did...

Commenting on Java 8 though, the feature I think is the most important is the new Compute method from the lambda calculus addition of Map interface. It allows me to modify ConcurrentHashMap without having to worry about locking the data structure, which is crucial to multithreaded environment like SFS!

Yep! It isn't actually stated in the updated interface, but in the compute function under ConcurrentHashMap it says:

Attempts to compute a mapping for the specified key and its current mapped value (or null if there is no current mapping). The entire method invocation is performed atomically. Some attempted update operations on this map by other threads may be blocked while computation is in progress, so the computation should be short and simple, and must not attempt to update any other mappings of this Map.

I'm still having some troubles. It seems like occasionally Smart Fox will dislike Java 8 and use Java 7 on restart.

So: working Java 8 extension running...I modify the JAR, replace it, restart server, then found out server didn't start. Check log, it says class loader error: Unsupported major.minor version 52.0. This is the signature error that indicates Java 8 code is being loaded by JRE 7. But I was running on Java 8 extension code before restart!

SmartFoxServer does not run with your system's Java Runtime, it uses its own, which is still Java 7.What is happening is that you have compiled your server code in Java 8 and you're attempting to run it in JVM 7, thus causing the error.

All you need to do is replace the SFS2X embedded JRE with the latest JRE 8, by following the 3 steps outlined in the opening post of this thread.

I had followed the instructions, however #2 should be split into 2 steps or re-written for clarity

2) Uncompress the download and replace the jre/ folder under the root of your SmartFoxServer 2X installation, replacing the existing folder. This will overwrite the previous JRE. For MacOSX users the jre/ folder will be new to the directory.

When you say "This step is not required for MacOS X" I logically assumed you were referring to the entire step #2.

Even with this, the SFS2X.app fails to load properly and throws the same error. Running the /sfs2x.sh script loads the new JRE since it looks for it and works, but this method cripples the OSX .app.

EDIT: To get the SFS2X.app working, I right clicked it and selected "Show Package Contents". From there, I opened up /Content/Resources/script and changed the following to replace the jre.bundle with the new JRE placed as instructed above:

Thanks.Point #2 is indeed to be skipped entirely under Mac OS X, because the Oracle Java installer will perform a global installation, system-wide.

The easiest way to get up and running is simply to install Java 8 and then launch SFS2X via sfs2x.sh script in the terminal. There actually a total of 4 ways to launch SFS2X on the Mac Three of which depend on the embedded JRE and require further hacking into the shell scripts.

We plan to release the next update embedding Java 8 by default, avoiding any other manual changes.