SFS2X Unreleased Small Tools_golastroom's Space_Baidu Space.
In the running script of sfs2x. For example, in sfs2x.bat under Windows, you can pass parameters to the running java script. You need to replace the original % with $, $ is used in Unix, and % is used in Windows. We can replace the $ inside with %, try it.
Two parameters can be passed here. If the first one is "cluster", the cluster will be enabled. However, this feature has not been fully developed, so enabling it will cause an error. We can bypass this.
If the second parameter is "console", the jython console will be enabled. In this console, you can directly manipulate the running jvm, that is, you can access and call objects in the jvm during runtime. This is very useful for monitoring and debugging the entire operation. I am also amazed by this technique.
So, let's give it a try. In cmd.
E:\Program Files\SFS2X-RC1\SFS2X>sfs2x.bat s console
Write any value for the first parameter, as long as it is not "cluster",
Press Enter, and the jython console will appear immediately.
You can directly access the object of the SmartFoxServer class through sfs.