SFS2X Start Fails with Java 16

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

Natalie
Posts: 1
Joined: 01 Apr 2021, 03:34

SFS2X Start Fails with Java 16

Postby Natalie » 01 Apr 2021, 08:43

Hello, I've just updated our game using java 16. I cannot start SFS2X with these logs:
Exception in thread "main" java.lang.ExceptionInInitializerError: Cannot access defaults field of Properties
at com.thoughtworks.xstream.converters.collections.PropertiesConverter.<clinit>(PropertiesConverter.java:46)
at com.thoughtworks.xstream.XStream.setupConverters(XStream.java:647)
at com.thoughtworks.xstream.XStream.<init>(XStream.java:445)
at com.thoughtworks.xstream.XStream.<init>(XStream.java:385)
at com.thoughtworks.xstream.XStream.<init>(XStream.java:323)
at com.smartfoxserver.v2.config.DefaultConfigLoader.loadCoreSettings(DefaultConfigLoader.java:36)
at com.smartfoxserver.v2.config.SFSConfigurator.loadConfiguration(SFSConfigurator.java:36)
at com.smartfoxserver.v2.SmartFoxServer.start(SmartFoxServer.java:261)
at com.smartfoxserver.v2.Main.main(Main.java:13)

But I start SFS2X with java 15.0.2 successfully. Please give me the version which fix this bug.
Thanks in advance!
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: SFS2X Start Fails with Java 16

Postby Lapo » 01 Apr 2021, 09:08

Hi,
SmartFoxServer 2X comes with its own embedded Java Runtime 8. You should stick with that to avoid compatibility issues. We've tested SFS2X with up to Java 11, but we don't recommend moving past that version as the runtime.

You can still use any JDK version as the development platform, provided you set the compilation compatibility back to 11 or so.

If you want to learn more, take a look at this article:
https://smartfoxserver.com/blog/java-9- ... server-2x/

Cheers
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 52 guests