Flash 致命错误:无法在smartFoxServer中创建日志文件

Flash 致命错误:无法在smartFoxServer中创建日志文件,flash,flash-builder,smartfoxserver,Flash,Flash Builder,Smartfoxserver,最近,我尝试在我的新项目中使用smartFoxServer。 问题是在安装之后,我尝试启动smartFoxServer,它会这样写: |------------------------------------------------------------| | SmartFoxServer | | Multiplayer Socket Server

最近,我尝试在我的新项目中使用smartFoxServer。 问题是在安装之后,我尝试启动smartFoxServer,它会这样写:

|------------------------------------------------------------|
|                      SmartFoxServer                        |
|                Multiplayer Socket Server                   |
|                      version 1.5.5                         |
|                           ---                              |
|              (c) 2004 - 2007 gotoAndPlay()                 |
|                  www.smartfoxserver.com                    |
|                    www.gotoandplay.it                      |
|------------------------------------------------------------|

java.nio.file.InvalidPathException: Illegal char <:> at index 2: \C:\Users\Ariel
PC\Documents\SmartFoxServerBASIC_1.5.5\Server\logs\smartfox_log_0.txt.lck
        at sun.nio.fs.WindowsPathParser.normalize(Unknown Source)
        at sun.nio.fs.WindowsPathParser.parse(Unknown Source)
        at sun.nio.fs.WindowsPathParser.parse(Unknown Source)
        at sun.nio.fs.WindowsPath.parse(Unknown Source)
        at sun.nio.fs.WindowsFileSystem.getPath(Unknown Source)
        at java.nio.file.Paths.get(Unknown Source)
        at java.util.logging.FileHandler.openFiles(Unknown Source)
        at java.util.logging.FileHandler.<init>(Unknown Source)
        at it.gotoandplay.smartfoxserver.SmartFoxServer.initLogger(SmartFoxServe
r.java:495)
        at it.gotoandplay.smartfoxserver.SmartFoxServer.run(SmartFoxServer.java:
585)
FATAL ERROR: Could not create log files.


Shutting down server...

Press any key to continue . . .
|------------------------------------------------------------|
|SmartFoxServer|
|多人套接字服务器|
|版本1.5.5|
|                           ---                              |
|(c)2004-2007年gotoAndPlay()|
|www.smartfoxserver.com|
|www.gotoandplay.it|
|------------------------------------------------------------|
java.nio.file.InvalidPathException:索引2:\C:\Users\Ariel处的非法字符
PC\Documents\SmartFoxServerBASIC\u 1.5.5\Server\logs\smartfox\u log\u 0.txt.lck
位于sun.nio.fs.WindowsPathParser.normalize(未知源)
位于sun.nio.fs.WindowsPathParser.parse(未知源)
位于sun.nio.fs.WindowsPathParser.parse(未知源)
位于sun.nio.fs.WindowsPath.parse(未知源)
位于sun.nio.fs.WindowsFileSystem.getPath(未知源)
位于java.nio.file.path.get(未知源)
位于java.util.logging.FileHandler.openFiles(未知源)
位于java.util.logging.FileHandler。(未知源)
在it.gotoandplay.smartfoxserver.smartfoxserver.initLogger(SmartFoxServe
r、 爪哇:495)
在it.gotoandplay.smartfoxserver.smartfoxserver.run(smartfoxserver.java:
585)
致命错误:无法创建日志文件。
正在关闭服务器。。。
按任意键继续。
我怎样才能解决这个问题?服务器不工作


谢谢!

我认为问题与Java版本有关,因为SmartFoxServer不支持JRE 8。因此,为了避免这个问题,您可以下载并安装JRE 6JRE 7,然后打开文件
SmartFoxServerBASIC\u 1.5.5\Server\start.bat
,并按如下方式编辑它(我们只更改java路径):

path\u of_jre
是指向jre目录的路径,例如:
C:\Program Files\Java\jre7

看看我使用三个版本的Java进行的测试:1.8、1.7和1.6:

Java 1.8.0版:

java version "1.8.0"
Java(TM) SE Runtime Environment (build 1.8.0-b132)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b70, mixed mode)
|------------------------------------------------------------|
|                      SmartFoxServer                        |
|                Multiplayer Socket Server                   |
|                      version 1.5.5                         |
|                           ---                              |
|              (c) 2004 - 2007 gotoAndPlay()                 |
|                  www.smartfoxserver.com                    |
|                    www.gotoandplay.it                      |
|------------------------------------------------------------|

java.nio.file.InvalidPathException: Illegal char <:> at index 2: \C:\Users\zo\Sm
artFoxServerBASIC_1.5.5\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:438)
        at java.util.logging.FileHandler.<init>(FileHandler.java:354)
        at it.gotoandplay.smartfoxserver.SmartFoxServer.initLogger(SmartFoxServe
r.java:495)
        at it.gotoandplay.smartfoxserver.SmartFoxServer.run(SmartFoxServer.java:
585)
FATAL ERROR: Could not create log files.

Shutting down server...
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b19)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)
|------------------------------------------------------------|
|                      SmartFoxServer                        |
|                Multiplayer Socket Server                   |
|                      version 1.5.5                         |
|                           ---                              |
|              (c) 2004 - 2007 gotoAndPlay()                 |
|                  www.smartfoxserver.com                    |
|                    www.gotoandplay.it                      |
|------------------------------------------------------------|

--- [ System Info ] ------------------------------------------

System CPU(s): 4
VM Max memory: 1431 MB

os.name: Windows 7
os.arch: amd64
os.version: 6.1
java.version: 1.7.0_65
java.vendor: Oracle Corporation
java.vendor.url: http://java.oracle.com/
java.vm.specification.version: 1.7
java.vm.version: 24.65-b04
java.vm.vendor: Oracle Corporation
java.vm.name: Java HotSpot(TM) 64-Bit Server VM

--- [ Network Cards ] -----------------------------------------
...
--- [ Licence Loaded ] ------------------------------------

Licence Type: BASIC
Licenced to : --== Free Demo License ==--
Max. Clients: 20

--- [ Zones & Rooms ] -------------------------------------
...
--- [ Server Starting ] ---------------------------------

Server address: 127.0.0.1
Server port   : 9339

22:05:39.295 - [ INFO ] > [EventWriter] ..... started :: 1 thread(s)
22:05:39.320 - [ INFO ] > [SystemHandler] ... started :: 1 thread(s)
22:05:39.321 - [ INFO ] > [ExtensionHandler]. started :: 1 thread(s)
22:05:39.321 - [ INFO ] > [DeadChannelsPolicy: strict]
22:05:39.322 - [ INFO ] > Server is up and running!
java version "1.6.0_45"
Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)
|------------------------------------------------------------|
|                      SmartFoxServer                        |
|                Multiplayer Socket Server                   |
|                      version 1.5.5                         |
|                           ---                              |
|              (c) 2004 - 2007 gotoAndPlay()                 |
|                  www.smartfoxserver.com                    |
|                    www.gotoandplay.it                      |
|------------------------------------------------------------|

--- [ System Info ] ------------------------------------------

System CPU(s): 4
VM Max memory: 1431 MB

os.name: Windows 7
os.arch: amd64
os.version: 6.1
java.version: 1.6.0_45
java.vendor: Sun Microsystems Inc.
java.vendor.url: http://java.sun.com/
java.vm.specification.version: 1.0
java.vm.version: 20.45-b01
java.vm.vendor: Sun Microsystems Inc.
java.vm.name: Java HotSpot(TM) 64-Bit Server VM

--- [ Network Cards ] -----------------------------------------
...
--- [ Licence Loaded ] ------------------------------------

Licence Type: BASIC
Licenced to : --== Free Demo License ==--
Max. Clients: 20

--- [ Zones & Rooms ] -------------------------------------
...
--- [ Server Starting ] ---------------------------------

Server address: 127.0.0.1
Server port   : 9339

22:09:07.578 - [ INFO ] > [EventWriter] ..... started :: 1 thread(s)
22:09:07.593 - [ INFO ] > [SystemHandler] ... started :: 1 thread(s)
22:09:07.594 - [ INFO ] > [ExtensionHandler]. started :: 1 thread(s)
22:09:07.594 - [ INFO ] > [DeadChannelsPolicy: strict]
22:09:07.594 - [ INFO ] > Server is up and running!
Java 1.6.0版45:

java version "1.8.0"
Java(TM) SE Runtime Environment (build 1.8.0-b132)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b70, mixed mode)
|------------------------------------------------------------|
|                      SmartFoxServer                        |
|                Multiplayer Socket Server                   |
|                      version 1.5.5                         |
|                           ---                              |
|              (c) 2004 - 2007 gotoAndPlay()                 |
|                  www.smartfoxserver.com                    |
|                    www.gotoandplay.it                      |
|------------------------------------------------------------|

java.nio.file.InvalidPathException: Illegal char <:> at index 2: \C:\Users\zo\Sm
artFoxServerBASIC_1.5.5\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:438)
        at java.util.logging.FileHandler.<init>(FileHandler.java:354)
        at it.gotoandplay.smartfoxserver.SmartFoxServer.initLogger(SmartFoxServe
r.java:495)
        at it.gotoandplay.smartfoxserver.SmartFoxServer.run(SmartFoxServer.java:
585)
FATAL ERROR: Could not create log files.

Shutting down server...
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b19)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)
|------------------------------------------------------------|
|                      SmartFoxServer                        |
|                Multiplayer Socket Server                   |
|                      version 1.5.5                         |
|                           ---                              |
|              (c) 2004 - 2007 gotoAndPlay()                 |
|                  www.smartfoxserver.com                    |
|                    www.gotoandplay.it                      |
|------------------------------------------------------------|

--- [ System Info ] ------------------------------------------

System CPU(s): 4
VM Max memory: 1431 MB

os.name: Windows 7
os.arch: amd64
os.version: 6.1
java.version: 1.7.0_65
java.vendor: Oracle Corporation
java.vendor.url: http://java.oracle.com/
java.vm.specification.version: 1.7
java.vm.version: 24.65-b04
java.vm.vendor: Oracle Corporation
java.vm.name: Java HotSpot(TM) 64-Bit Server VM

--- [ Network Cards ] -----------------------------------------
...
--- [ Licence Loaded ] ------------------------------------

Licence Type: BASIC
Licenced to : --== Free Demo License ==--
Max. Clients: 20

--- [ Zones & Rooms ] -------------------------------------
...
--- [ Server Starting ] ---------------------------------

Server address: 127.0.0.1
Server port   : 9339

22:05:39.295 - [ INFO ] > [EventWriter] ..... started :: 1 thread(s)
22:05:39.320 - [ INFO ] > [SystemHandler] ... started :: 1 thread(s)
22:05:39.321 - [ INFO ] > [ExtensionHandler]. started :: 1 thread(s)
22:05:39.321 - [ INFO ] > [DeadChannelsPolicy: strict]
22:05:39.322 - [ INFO ] > Server is up and running!
java version "1.6.0_45"
Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)
|------------------------------------------------------------|
|                      SmartFoxServer                        |
|                Multiplayer Socket Server                   |
|                      version 1.5.5                         |
|                           ---                              |
|              (c) 2004 - 2007 gotoAndPlay()                 |
|                  www.smartfoxserver.com                    |
|                    www.gotoandplay.it                      |
|------------------------------------------------------------|

--- [ System Info ] ------------------------------------------

System CPU(s): 4
VM Max memory: 1431 MB

os.name: Windows 7
os.arch: amd64
os.version: 6.1
java.version: 1.6.0_45
java.vendor: Sun Microsystems Inc.
java.vendor.url: http://java.sun.com/
java.vm.specification.version: 1.0
java.vm.version: 20.45-b01
java.vm.vendor: Sun Microsystems Inc.
java.vm.name: Java HotSpot(TM) 64-Bit Server VM

--- [ Network Cards ] -----------------------------------------
...
--- [ Licence Loaded ] ------------------------------------

Licence Type: BASIC
Licenced to : --== Free Demo License ==--
Max. Clients: 20

--- [ Zones & Rooms ] -------------------------------------
...
--- [ Server Starting ] ---------------------------------

Server address: 127.0.0.1
Server port   : 9339

22:09:07.578 - [ INFO ] > [EventWriter] ..... started :: 1 thread(s)
22:09:07.593 - [ INFO ] > [SystemHandler] ... started :: 1 thread(s)
22:09:07.594 - [ INFO ] > [ExtensionHandler]. started :: 1 thread(s)
22:09:07.594 - [ INFO ] > [DeadChannelsPolicy: strict]
22:09:07.594 - [ INFO ] > Server is up and running!

希望所有这些都能对您有所帮助。

可能是@Houseman的副本,但有点不同。在*.bat中调整java的路径为我解决了这个问题,谢谢。