最近,我尝试在我的新项目中使用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 . . .我怎么才能解决呢?服务器坏了!
谢谢!
发布于 2015-01-04 21:14:41
我认为问题与Java 有关,因为SmartFoxServer不支持JRE 8。因此,为了避免这个问题,您可以下载并安装JRE 6或JRE 7,然后打开文件SmartFoxServerBASIC_1.5.5\Server\start.bat并像这样编辑它(我们将只更改java路径):
@"path_of_jre\bin\java.exe" -cp "./;/;./lib/nanoxml-2.2.1.jar;./lib/js.jar;./lib/jython.jar;./lib/commons-pool-1.2.jar;./lib/commons-dbcp-1.2.1.jar;./lib/commons-collections-3.1.jar;./lib/activation.jar;./lib/javamail/smtp.jar;./lib/javamail/mailapi.jar;./lib/jetty/jetty.jar;./lib/jetty/jetty-util.jar;./lib/jetty/servlet-api-2.5.jar;./lib/jetty/multipartrequest.jar;./lib/json.jar;./lib/xbean.jar;./lib/jsr173_1.0_api.jar;./lib/concurrent.jar;./lib/jysfs.jar;" -Dfile.encoding=UTF-8 -Djava.util.logging.config.file=logging.properties it.gotoandplay.smartfoxserver.SmartFoxServer
@pausepath_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版本1.7.0_65 :
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版本1.6.0_45 :
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!希望所有这些都能帮到你。
https://stackoverflow.com/questions/27767975
复制相似问题