English Sentence Loading...
英语句子加载中...

SFS 关于用java写服务器扩展不能重载的解决方案

使用java写服务器扩展可能会碰到编译过后的新class文件替换旧的文件,在sfs服务器端,依然是使用的旧文件,导致重载失败。

解决方法如下:
1. 删除 wrapper.conf 文件下的 “wrapper.java.classpath.3=./javaExtensions/” 此处代码
2. 删除 start.bat批处理文件下的 “./javaExtensions/;” 此处代码
3. 要想自动重新载入新文件,可以在config文件里加上 此句代码激活 “<AutoReloadExtensions>true</AutoReloadExtensions>” 如下:
   <Zone name="simpleChat" uCountUpdate="true" buddyList="20" maxUsers="4000" customLogin="false">
   <Rooms>
    <Room name="The Hall" maxUsers="50" isPrivate="false" isTemp="false" autoJoin="true" uCountUpdate="true" >
                                <Vars>
                                      <Var name="sit" type="s" private="false" persistent="true">000000</Var>
                                </Vars>
                                </Room>  
    <Room name="The Kitchen" maxUsers="50" isPrivate="false" isGame="false" isTemp="false"/>
    <Room name="The Garden" maxUsers="50" isPrivate="false" isTemp="false" />
    <Room name="The Bathroom" maxUsers="50" isPrivate="false" isTemp="false" />
    <Room name="The Garage" maxUsers="50" isPrivate="false" isTemp="false" />
    <Room name="The Living Room" maxUsers="50" isPrivate="true" isTemp="false" pwd="test" />
   </Rooms>
   
   <Extensions>
    <extension name="json" className="jsonSample.as" type="script" />
   </Extensions>
   <AutoReloadExtensions>true</AutoReloadExtensions>
   <Moderators status="on">
    <Mod name="modName" pwd="modPass" />
   </Moderators>
  </Zone>

4. 最重要的一步,重新执行 start.bat

over...
引用通告地址: http://www.xy50.com.cn/myblog/trackback.php?tbID=114&extra=168abd
标签: smartfoxserver 网游 webgame
评论: 0 | 引用: 0 | 阅读: 442