Support for JDK 8 / 9

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

Minoa
Posts: 5
Joined: 04 Apr 2018, 20:00

Support for JDK 8 / 9

Postby Minoa » 14 Sep 2018, 12:22

Hi,

I've been wondering if it's possible to use JDK 8 or 9. I've followed through this guide but it did not work for PRO version.
viewtopic.php?t=17979

This is the error I get from replacing the jre folder:

Code: Select all

|::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::|
|                                                            |
|              ...:::  SmartFoxServer :::...                 |
|                Multiplayer Socket Server                   |
|                      version 1.6.19                        |
|                           ---                              |
|              (c) 2004 - 2017 gotoAndPlay()                 |
|                  www.smartfoxserver.com                    |
|                                                            |
|::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::|

java.nio.file.InvalidPathException: Illegal char <:> at index 2: \C:\[FoM - v1] - Emulator\Server\logs\smartfox_log_0.txt.lck
        at sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
        at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
        at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
        at sun.nio.fs.WindowsPath.parse(WindowsPath.java:94)
        at sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:255)
        at java.nio.file.Paths.get(Paths.java:84)
        at java.util.logging.FileHandler.openFiles(FileHandler.java:472)
        at java.util.logging.FileHandler.<init>(FileHandler.java:380)
        at it.gotoandplay.smartfoxserver.SmartFoxServer.initLogger(SmartFoxServer.java:509)
        at it.gotoandplay.smartfoxserver.SmartFoxServer.run(SmartFoxServer.java:589)
FATAL ERROR: Could not create log files.


Shutting down server...

Press any key to continue . . .


I am upgrading to JDK 8 due to recent upgrade from MySQL 5.7 to MySQL 8 resulted in a few warnings I had in the compiler.
Image

Is there a solution to this?
User avatar
Lapo
Site Admin
Posts: 20216
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Support for JDK 8 / 9

Postby Lapo » 14 Sep 2018, 16:11

Hi,
I don't think there's any problem running SFS PRO 1.6.x with Java 8 and probably also Java 9 as well.
I've tested under Linux with Java 1.8.0_181 and it works just fine.

I think the error you're seeing is probably not related with the JRE. In any case what version of JRE are you running?
I'd recommend sticking with Java 8 if possible.

Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
Minoa
Posts: 5
Joined: 04 Apr 2018, 20:00

Re: Support for JDK 8 / 9

Postby Minoa » 15 Sep 2018, 00:02

I'm running the latest one I believe.

Code: Select all

C:\Users\Administrator>java.exe -version
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)


Could the error be Windows only related and probably why you arent seeing that in Linux? I'm assuming so because of the error that I showed earlier.
User avatar
Lapo
Site Admin
Posts: 20216
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Support for JDK 8 / 9

Postby Lapo » 15 Sep 2018, 10:56

Looks like it's a Windows only issue.
If you send us a message to our support@... email box with a reference to this discussion we'll send a patch to test on your side.

We've tested it under Windows 10 and it works with JDK 8.

Cheers
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SmartFoxServer 1.x Discussions and Help”

Who is online

Users browsing this forum: No registered users and 6 guests